[RFC] PowerPC - e6500 optimized memset function
diff mbox

Message ID BLUPR03MB1458E4AA05B806866C98849BC26B0@BLUPR03MB1458.namprd03.prod.outlook.com
State New
Headers show

Commit Message

rohitarulraj@freescale.com Aug. 31, 2015, 5:21 a.m. UTC
Hello All,

Please find below, patch for optimized implementation of 'memset' for PowerPC e6500 (32-bit & 64-bit) target using Altivec instructions.

2015-08-31  Rohit Arul Raj <rohitarulraj@freescale.com>

	* sysdeps/powerpc/powerpc32/e6500/memset.S: New File: optimized memset
	implementation using altivec instructions.
	* sysdeps/powerpc/powerpc32/e6500/multiarch/rtld-memset.S: New File.
	* sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c:: Add
	check for e6500 bzero function.
	* sysdeps/powerpc/powerpc32/power4/multiarch/bzero-e6500.S: New File:
	multiarch e6500 bzero.
	* sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add check for e6500 memset & bzero function.
	* sysdeps/powerpc/powerpc32/power4/multiarch/Makefile: Add
	memset-e6500 and bzero-e6500 object.
	* sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Add
	check for e6500 memset function.
	* sysdeps/powerpc/powerpc32/power4/multiarch/memset-e6500.S New File:
	multiarch e6500 memset.
	* sysdeps/powerpc/powerpc64/e6500/memset.S: New File: optimized memset
	implementation using altivec instructions.
	* sysdeps/powerpc/powerpc64/multiarch/bzero.c: Add
	check for e6500 bzero function.
	* sysdeps/powerpc/powerpc64/multiarch/bzero-e6500.S: New File:
	multiarch e6500 bzero.
	* sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add check for e6500 memset & bzero function.
	* sysdeps/powerpc/powerpc64/multiarch/Makefile: Add
	memset-e6500 and bzero-e6500 object.
	* sysdeps/powerpc/powerpc64/multiarch/memset.c: Add
	check for e6500 memset function.
	* sysdeps/powerpc/powerpc64/multiarch/memset-e6500.S: New File:
	multiarch e6500 memset.


The patch was generated on top of glibc v2.20 source base.
The patch was tested with dejaGNU and glibc testsuite. There were no regressions.

The benchsuite (both 32-bit and 64-bit) results are attached for your reference.

Please let me know your comments.

Regards,
Rohit
builtin_memset  simple_memset   __memset_e6500  __memset_ppc
Length    1, alignment  0, c -65:       34.7344 13.8125 22.6094 22.6094
Length    2, alignment  0, c -65:       32.9375 16.2969 23.6875 23.6094
Length    4, alignment  0, c -65:       34.4531 22.2656 25.5781 25.5156
Length    8, alignment  0, c -65:       38.9688 30.6406 28.5625 28.6406
Length   16, alignment  0, c -65:       35.2656 54.8906 25.5938 26.6094
Length   32, alignment  0, c -65:       47.0938 87.4688 33.0938 32.5469
Length   64, alignment  0, c -65:       45.6562 151.484 35.7812 36.6562
Length  128, alignment  0, c -65:       49.5469 278.797 39.7969 46.6719
Length  256, alignment  0, c -65:       62.1094 534.688 49.7969 78.6875
Length  512, alignment  0, c -65:       84.6875 1046.59 71.8281 117.547
Length 1024, alignment  0, c -65:       133.641 2070.56 123.609 203.688
Length 2048, alignment  0, c -65:       225.766 4139.88 215.609 378.969
Length 4096, alignment  0, c -65:       409.938 8257.34 399.625 723.75
Length 8192, alignment  0, c -65:       777.406 16406.8 767.594 1413.81
Length 16384, alignment  0, c -65:      1514.12 32790.9 1503.92 2799.75
Length 32768, alignment  0, c -65:      2986.83 65559.1 2976.14 6457.23
Length 65536, alignment  0, c -65:      5930.5  131309  5919.91 13806
Length 131072, alignment  0, c -65:     11819.1 263942  11808.1 28499.2
Length    1, alignment  1, c -65:       31.7656 13.625  22.5    22.5156
Length    2, alignment  2, c -65:       32.8438 15.8438 23.1719 23.2656
Length    3, alignment  3, c -65:       33.25   18.4219 24.2656 24.25
Length    3, alignment  0, c -65:       33.7344 17.8594 24.5156 24.1719
Length    4, alignment  4, c -65:       34.3906 21.8438 25.1562 25.1562
Length    5, alignment  5, c -65:       35.5312 24.0781 25.4062 25.2344
Length    5, alignment  0, c -65:       35.75   24.2344 25.5625 25.5469
Length    6, alignment  6, c -65:       36.3906 26.0312 26.75   26.5625
Length    6, alignment  0, c -65:       36.7656 26.2969 26.2188 26.5625
Length    7, alignment  7, c -65:       37.3906 28.0469 27.6562 27.6719
Length    7, alignment  0, c -65:       37.7656 28.0156 27.75   27.2031
Length    8, alignment  0, c -65:       38.4062 29.4531 28.2031 28.2031
Length    9, alignment  1, c -65:       37.375  47.4688 27.5469 33.5
Length    9, alignment  0, c -65:       37.375  46.4688 27.5156 28.5469
Length   10, alignment  2, c -65:       36.6094 49.5    26.5625 31.5625
Length   10, alignment  0, c -65:       36.25   49.6094 26.5625 27.5469
Length   11, alignment  3, c -65:       37.75   51.5    27.3125 32.6719
Length   11, alignment  0, c -65:       37.4062 52.4688 27.2188 28.2188
Length   12, alignment  4, c -65:       36.4688 54.3125 26.7188 32.625
Length   12, alignment  0, c -65:       36.4062 54.4531 26.625  27.6875
Length   13, alignment  5, c -65:       38.8281 56.5781 28.6406 33.6562
Length   13, alignment  0, c -65:       38.3438 53.0625 28.625  29.5469
Length   14, alignment  6, c -65:       36.9688 55.125  26.6875 32.5625
Length   14, alignment  0, c -65:       36.6562 55.3594 26.6719 27.5938
Length   15, alignment  7, c -65:       38.5156 52.8906 28.7656 33.5625
Length   15, alignment  0, c -65:       38.5781 52.5625 28.7344 29.5781
Length   16, alignment  0, c -65:       35.4844 54.5469 25.5781 26.625
Length   17, alignment  1, c -65:       42.2969 56.7969 28.6094 34.5312
Length   17, alignment  0, c -65:       40.7656 56.9219 26.6406 27.5938
Length   18, alignment  2, c -65:       41.2656 58.6875 28.6094 32.5625
Length   18, alignment  0, c -65:       246.047 58.6094 26.2344 28.0938
Length   19, alignment  3, c -65:       43.4062 60.25   29.5938 33.6875
Length   19, alignment  0, c -65:       43.375  60.6094 29.5469 30.5469
Length   20, alignment  4, c -65:       41.4062 62.6094 27.2656 31.2344
Length   20, alignment  0, c -65:       40.2656 62.6406 26.5781 27.2188
Length   21, alignment  5, c -65:       45.625  64.3906 31.6094 34.5938
Length   21, alignment  0, c -65:       41.625  65.0312 27.5938 28.5938
Length   22, alignment  6, c -65:       44.7656 66.7656 30.25   32.2188
Length   22, alignment  0, c -65:       41.4062 66.2031 27.5781 28.6094
Length   23, alignment  7, c -65:       46.4844 68.4219 32.3281 33.2188
Length   23, alignment  0, c -65:       43.4062 68.3438 29.2969 30.2031
Length   24, alignment  0, c -65:       40.5469 70.6875 26.5781 27.2656
Length   24, alignment  0, c -65:       40.75   70.8594 26.5781 27.5781
Length   25, alignment  1, c -65:       44.5469 72.6875 30.6094 35.5469
Length   25, alignment  0, c -65:       41.7656 72.6875 27.6094 28.5938
Length   26, alignment  2, c -65:       43.6875 74.9688 30.7188 32.5625
Length   26, alignment  0, c -65:       41.4844 74.6875 27.5938 28.6094
Length   27, alignment  3, c -65:       45.6875 76.6094 31.5938 34.6719
Length   27, alignment  0, c -65:       44.375  76.625  30.5469 31.5469
Length   28, alignment  4, c -65:       43.4531 78.6094 29.7031 32.5938
Length   28, alignment  0, c -65:       41.4062 78.9531 27.6719 28.5781
Length   29, alignment  5, c -65:       47.4688 80.8438 33.625  35.5938
Length   29, alignment  0, c -65:       42.4062 80.6094 28.5938 29.5938
Length   30, alignment  6, c -65:       46.2656 82.5625 32.6094 33.5781
Length   30, alignment  0, c -65:       42.7656 83.0469 28.5781 29.5781
Length   31, alignment  7, c -65:       48.5469 85      34.5938 34.5781
Length   31, alignment  0, c -65:       44.4844 84.8594 30.5781 31.5625
Length   14, alignment  1, c -65:       36.7656 50.75   26.6875 34.2031
Length 1024, alignment  3, c -65:       150.812 2081.31 133.719 216.562
Length   64, alignment  4, c -65:       50.8594 150.547 40.6406 49.5469
Length   25, alignment  2, c -65:       44.4062 72.7969 30.6094 35.5312
Length    1, alignment  0, c  0:        31.375  13.7344 22.5156 22.5156
Length    2, alignment  0, c  0:        32.375  16.125  23.6094 23.5938
Length    4, alignment  0, c  0:        34.25   22.0938 25.5938 25.5156
Length    8, alignment  0, c  0:        38.7656 29.875  28.6406 28.7188
Length   16, alignment  0, c  0:        35.4844 54.9062 25.5781 26.625
Length   32, alignment  0, c  0:        47.0156 87.0938 33.1094 41.5938
Length   64, alignment  0, c  0:        44.375  151.266 35.375  44.8281
Length  128, alignment  0, c  0:        46.9844 278.672 37.3281 49.1094
Length  256, alignment  0, c  0:        58.7031 537.203 48.8125 57.2656
Length  512, alignment  0, c  0:        59      1051.88 49.3438 73.1094
Length 1024, alignment  0, c  0:        82.4688 2070.67 72.7188 109.203
Length 2048, alignment  0, c  0:        118.5   4139.88 109.719 172.781
Length 4096, alignment  0, c  0:        202.391 8214.67 190.688 300.719
Length 8192, alignment  0, c  0:        373.359 16709.9 363.156 556.562
Length 16384, alignment  0, c  0:       715.734 32790.8 703.438 1069.62
Length 32768, alignment  0, c  0:       1398.94 66180.1 1387.44 2093.61
Length 65536, alignment  0, c  0:       2764.08 131429  2752.5  4141.48
Length 131072, alignment  0, c  0:      5494.73 263678  5483.03 8238
Length    1, alignment  1, c  0:        31.7812 13.7344 22.5156 22.5156
Length    2, alignment  2, c  0:        32.4062 16.125  23.6094 23.6094
Length    3, alignment  3, c  0:        33.25   19.5625 24.5    24.5
Length    3, alignment  0, c  0:        33.7969 18.25   24.5156 24.5
Length    4, alignment  4, c  0:        34.8125 22.3906 25.5938 25.5938
Length    5, alignment  5, c  0:        35.5    24.6094 25.6406 25.6094
Length    5, alignment  0, c  0:        35.4219 24.0156 25.5469 25.5469
Length    6, alignment  6, c  0:        36.6875 26.0938 26.6562 26.5938
Length    6, alignment  0, c  0:        36.4062 26.0938 26.5625 26.5938
Length    7, alignment  7, c  0:        37.4844 28.0469 27.5625 27.5625
Length    7, alignment  0, c  0:        37.4844 28.1562 27.75   27.75
Length    8, alignment  0, c  0:        38.4688 44.5938 28.6562 28.5625
Length    9, alignment  1, c  0:        37.7344 46.7031 27.6406 33.5312
Length    9, alignment  0, c  0:        37.5781 46.625  27.5469 28.5469
Length   10, alignment  2, c  0:        36.6094 49.5781 26.6562 31.5781
Length   10, alignment  0, c  0:        36.375  49.5625 26.6406 27.6406
Length   11, alignment  3, c  0:        37.4844 52.4688 27.6562 32.6719
Length   11, alignment  0, c  0:        37.4062 51.4375 27.6406 28.5625
Length   12, alignment  4, c  0:        36.5469 51.3125 26.7188 32.625
Length   12, alignment  0, c  0:        36.4531 50.9531 26.7031 27.5469
Length   13, alignment  5, c  0:        38.4688 53.0625 28.6406 33.5625
Length   13, alignment  0, c  0:        38.4531 53.0312 28.6406 29.5469
Length   14, alignment  6, c  0:        36.5    50.6875 26.6875 32.5625
Length   14, alignment  0, c  0:        36.4844 54.5625 26.6719 27.5938
Length   15, alignment  7, c  0:        38.5    52.5625 28.6719 33.5625
Length   15, alignment  0, c  0:        38.4844 52.7656 28.7344 29.5781
Length   16, alignment  0, c  0:        35.4844 54.9219 25.6094 26.6094
Length   17, alignment  1, c  0:        42.4844 56.625  28.6406 34.5312
Length   17, alignment  0, c  0:        40.4844 56.8438 26.5938 27.5938
Length   18, alignment  2, c  0:        41.4062 58.8438 28.5938 32.5469
Length   18, alignment  0, c  0:        40.4844 58.6094 26.5938 28.1875
Length   19, alignment  3, c  0:        43.9688 60.5625 29.6094 33.6875
Length   19, alignment  0, c  0:        43.375  60.8125 29.625  30.5469
Length   20, alignment  4, c  0:        41.4844 62.5625 27.625  31.5938
Length   20, alignment  0, c  0:        40.4062 62.75   26.6719 27.5781
Length   21, alignment  5, c  0:        45.6094 64.6094 31.7031 34.6719
Length   21, alignment  0, c  0:        41.4062 64.6094 27.5938 28.5938
Length   22, alignment  6, c  0:        44.4062 66.7969 30.6094 32.5781
Length   22, alignment  0, c  0:        41.4844 66.9688 27.5781 28.5781
Length   23, alignment  7, c  0:        46.4062 68.6406 32.5938 33.5781
Length   23, alignment  0, c  0:        43.4062 68.6094 29.5781 30.5625
Length   24, alignment  0, c  0:        40.4062 70.75   26.6719 27.5781
Length   24, alignment  0, c  0:        40.4062 70.5938 26.5625 27.5781
Length   25, alignment  1, c  0:        44.4844 72.6094 30.6406 35.75
Length   25, alignment  0, c  0:        41.4062 72.6094 27.6094 28.875
Length   26, alignment  2, c  0:        43.4062 74.5625 30.6875 32.5625
Length   26, alignment  0, c  0:        41.4844 74.6094 27.6094 28.6094
Length   27, alignment  3, c  0:        45.6094 76.6875 31.5938 34.6719
Length   27, alignment  0, c  0:        44.375  76.7031 30.5781 31.5469
Length   28, alignment  4, c  0:        43.5312 78.6875 29.625  32.5938
Length   28, alignment  0, c  0:        41.4062 78.5625 27.625  28.6094
Length   29, alignment  5, c  0:        47.6719 80.5625 33.625  35.5938
Length   29, alignment  0, c  0:        42.4844 80.5625 28.6562 29.5938
Length   30, alignment  6, c  0:        46.6875 82.6719 32.6094 33.6719
Length   30, alignment  0, c  0:        42.4844 82.7969 28.5781 29.5781
Length   31, alignment  7, c  0:        48.5469 85.0625 34.5938 34.5938
Length   31, alignment  0, c  0:        44.7656 85.1094 30.2031 31.5625
Length   14, alignment  1, c  0:        36.8438 50.8906 26.6875 34.5625
Length 1024, alignment  3, c  0:        95.25   2070.59 83.8125 125.438
Length   64, alignment  4, c  0:        50.5625 151.281 40.6719 57.75
Length   25, alignment  2, c  0:        44.5312 72.6094 30.6094 35.5312
Length    1, alignment  0, c 65:        31.375  13.7656 22.5    22.5156
Length    2, alignment  0, c 65:        32.3281 16.2031 23.5    23.5156
Length    4, alignment  0, c 65:        34.8125 22.4844 25.5    25.5
Length    8, alignment  0, c 65:        38.4062 30.1094 28.7344 28.6562
Length   16, alignment  0, c 65:        35.4062 54.8906 25.6094 26.5938
Length   32, alignment  0, c 65:        47.0156 87.8438 33.0312 32.5625
Length   64, alignment  0, c 65:        46.2812 150.672 36.0156 36.5625
Length  128, alignment  0, c 65:        50.1875 278.688 39.7969 46.3281
Length  256, alignment  0, c 65:        62.125  537.188 49.8125 78.6875
Length  512, alignment  0, c 65:        84.4844 1046.61 71.9219 117.203
Length 1024, alignment  0, c 65:        133.375 2070.88 123.594 203.703
Length 2048, alignment  0, c 65:        225.703 4118.61 215.625 375.719
Length 4096, alignment  0, c 65:        409.766 8214.59 399.703 719.766
Length 8192, alignment  0, c 65:        777.438 16626.1 767.703 1414.62
Length 16384, alignment  0, c 65:       1514.86 32791   1503.86 2788.02
Length 32768, alignment  0, c 65:       2986.78 66431.7 2975.86 6457.88
Length 65536, alignment  0, c 65:       5930.42 131373  5919.86 13811
Length 131072, alignment  0, c 65:      11818.7 263693  11808.4 28499.2
Length    1, alignment  1, c 65:        31.7344 13.6406 22.6094 22.5156
Length    2, alignment  2, c 65:        32.7344 16.125  23.6094 23.6094
Length    3, alignment  3, c 65:        33.3906 18.1094 24.5    24.1562
Length    3, alignment  0, c 65:        33.375  19.0781 24.5156 24.5
Length    4, alignment  4, c 65:        34.3281 22.5    25.3281 25.25
Length    5, alignment  5, c 65:        35.6094 24.2188 25.2344 25.6094
Length    5, alignment  0, c 65:        35.8281 24.0938 25.5625 25.5469
Length    6, alignment  6, c 65:        36.6094 26.0156 26.6562 26.5625
Length    6, alignment  0, c 65:        36.4062 26.1562 26.5625 26.6562
Length    7, alignment  7, c 65:        37.4688 27.9531 27.6562 27.6875
Length    7, alignment  0, c 65:        37.7656 28      27.5625 27.5781
Length    8, alignment  0, c 65:        38.2656 30.1719 28.5625 28.6406
Length    9, alignment  1, c 65:        37.6094 31.6719 27.5469 33.5625
Length    9, alignment  0, c 65:        37.7344 46.7344 27.5469 28.5469
Length   10, alignment  2, c 65:        36.375  49.5469 26.5625 31.5781
Length   10, alignment  0, c 65:        36.8125 49.5312 26.5781 27.5625
Length   11, alignment  3, c 65:        37.75   51.5156 27.2188 32.6719
Length   11, alignment  0, c 65:        37.75   52.5    27.5625 28.5625
Length   12, alignment  4, c 65:        36.4688 54.4219 26.625  32.5625
Length   12, alignment  0, c 65:        36.6094 54.5156 26.625  27.5625
Length   13, alignment  5, c 65:        38.4688 52.75   28.6406 33.5625
Length   13, alignment  0, c 65:        38.5312 52.9531 28.625  29.5469
Length   14, alignment  6, c 65:        36.5    50.5938 26.6719 32.9531
Length   14, alignment  0, c 65:        36.5781 50.875  26.6875 27.625
Length   15, alignment  7, c 65:        38.7031 52.6875 28.6875 33.5781
Length   15, alignment  0, c 65:        44.375  52.6094 34.5469 29.5938
Length   16, alignment  0, c 65:        35.4062 54.8281 25.5938 26.6094
Length   17, alignment  1, c 65:        42.4375 56.5625 28.6094 34.5469
Length   17, alignment  0, c 65:        40.4062 56.6094 26.5938 27.625
Length   18, alignment  2, c 65:        41.6094 58.6094 28.625  32.75
Length   18, alignment  0, c 65:        40.4062 58.6094 26.6094 28.0938
Length   19, alignment  3, c 65:        43.4062 60.6094 29.6094 33.6875
Length   19, alignment  0, c 65:        43.5781 60.6719 29.5469 30.5625
Length   20, alignment  4, c 65:        41.4062 62.6875 27.7031 31.6094
Length   20, alignment  0, c 65:        40.4062 62.75   26.6719 27.5781
Length   21, alignment  5, c 65:        45.4844 64.6875 31.6094 34.5938
Length   21, alignment  0, c 65:        41.4062 64.6875 27.5938 28.5938
Length   22, alignment  6, c 65:        44.6094 66.6875 30.6094 32.6719
Length   22, alignment  0, c 65:        41.4062 66.6875 27.5781 28.5938
Length   23, alignment  7, c 65:        46.4062 68.9844 32.5938 33.5781
Length   23, alignment  0, c 65:        43.4062 68.5469 29.5625 30.5625
Length   24, alignment  0, c 65:        40.8438 70.5625 26.5625 27.5625
Length   24, alignment  0, c 65:        40.7656 70.7656 26.5781 27.5781
Length   25, alignment  1, c 65:        44.4062 72.6875 30.7031 35.5469
Length   25, alignment  0, c 65:        41.4844 72.6875 27.2344 28.6094
Length   26, alignment  2, c 65:        43.4844 74.7969 30.6094 32.5625
Length   26, alignment  0, c 65:        41.4844 74.6875 27.5938 28.6094
Length   27, alignment  3, c 65:        45.4062 76.8125 31.6875 34.6719
Length   27, alignment  0, c 65:        44.375  76.8125 30.5781 31.5469
Length   28, alignment  4, c 65:        43.5312 79.0156 29.7031 32.2344
Length   28, alignment  0, c 65:        41.4062 78.6094 27.6719 28.5781
Length   29, alignment  5, c 65:        47.5469 80.5625 33.6094 35.5938
Length   29, alignment  0, c 65:        42.6094 80.5625 28.2344 29.6875
Length   30, alignment  6, c 65:        46.5625 82.8438 32.6094 33.5781
Length   30, alignment  0, c 65:        42.4062 82.9688 28.5781 29.5781
Length   31, alignment  7, c 65:        48.4688 84.5625 34.5938 34.5781
Length   31, alignment  0, c 65:        44.4219 84.5625 30.5625 31.5625
Length   14, alignment  1, c 65:        36.6094 54.9062 26.6875 34.5469
Length 1024, alignment  3, c 65:        150.562 2081.33 133.484 217.328
Length   64, alignment  4, c 65:        50.8594 150.594 40.7656 49.5781
Length   25, alignment  2, c 65:        44.4375 72.6094 30.6094 35.5312
Length    1, alignment  0, c 130:       31.4062 13.7344 22.5156 22.5156
Length    2, alignment  0, c 130:       32.4062 16.4219 23.5156 23.6094
Length    4, alignment  0, c 130:       34.2656 22.4531 25.5938 25.5938
Length    8, alignment  0, c 130:       38.8125 30.2344 28.6562 28.5625
Length   16, alignment  0, c 130:       35.4219 54.8125 25.6094 26.625
Length   32, alignment  0, c 130:       50.5312 88.5    34.5469 32.6562
Length   64, alignment  0, c 130:       45.5    152.203 35.6562 36.5625
Length  128, alignment  0, c 130:       49.5    281.297 39.5    46.4219
Length  256, alignment  0, c 130:       61.7969 534.328 49.5938 78.4062
Length  512, alignment  0, c 130:       93.2656 1046.61 83.4375 117.609
Length 1024, alignment  0, c 130:       133.688 2070.59 123.609 203.656
Length 2048, alignment  0, c 130:       225.859 4139.94 215.609 375.734
Length 4096, alignment  0, c 130:       409.406 8214.2  399.266 723.328
Length 8192, alignment  0, c 130:       777.672 16491.9 767.609 1417.22
Length 16384, alignment  0, c 130:      1514.12 35953   1504.02 2787.8
Length 32768, alignment  0, c 130:      2986.55 65558.9 2976.34 6461.91
Length 65536, alignment  0, c 130:      5930.42 131991  5919.91 13810.7
Length 131072, alignment  0, c 130:     11818.7 263786  11808.4 28843.6
Length    1, alignment  1, c 130:       31.7812 13.4531 22.1719 22.1719
Length    2, alignment  2, c 130:       32.4688 15.8438 23.3906 23.5156
Length    3, alignment  3, c 130:       33.4531 18.6719 24.1562 24.1719
Length    3, alignment  0, c 130:       33.25   18.0938 24.5156 24.5
Length    4, alignment  4, c 130:       34.625  22.4688 25.6719 25.5938
Length    5, alignment  5, c 130:       35.4219 24.2031 25.5469 25.4062
Length    5, alignment  0, c 130:       35.4062 23.5312 25.2969 25.3125
Length    6, alignment  6, c 130:       36.8594 26.0156 26.5781 26.5625
Length    6, alignment  0, c 130:       36.4219 26.0156 26.2188 26.2031
Length    7, alignment  7, c 130:       37.5312 27.5156 27.4844 27.2969
Length    7, alignment  0, c 130:       37.4531 27.5156 27.5625 27.2031
Length    8, alignment  0, c 130:       38.4219 29.5156 28.2031 28.2969
Length    9, alignment  1, c 130:       37.4688 47.5    27.5312 33.5312
Length    9, alignment  0, c 130:       37.4219 46.4688 27.5469 28.2031
Length   10, alignment  2, c 130:       36.4375 49.625  26.6562 31.2344
Length   10, alignment  0, c 130:       36.4062 49.1406 26.2188 27.2188
Length   11, alignment  3, c 130:       37.4219 52.125  27.6094 32.6719
Length   11, alignment  0, c 130:       37.4062 51.4375 27.2188 28.5625
Length   12, alignment  4, c 130:       36.4844 54.5625 26.3906 32.5469
Length   12, alignment  0, c 130:       36.5312 50.7969 26.2969 27.3125
Length   13, alignment  5, c 130:       38.5    52.7812 28.3125 33.5625
Length   13, alignment  0, c 130:       38.8594 53.5469 28.7031 29.625
Length   14, alignment  6, c 130:       36.8438 50.6875 26.3281 32.2031
Length   14, alignment  0, c 130:       36.4844 50.5312 26.3281 27.2344
Length   15, alignment  7, c 130:       38.5    52.8906 28.4062 33.2031
Length   15, alignment  0, c 130:       38.5781 52.6094 28.375  29.2188
Length   16, alignment  0, c 130:       35.4062 54.4688 25.3281 26.7344
Length   17, alignment  1, c 130:       42.4062 56.6094 28.25   34.2656
Length   17, alignment  0, c 130:       40.4062 56.25   26.5938 27.2344
Length   18, alignment  2, c 130:       41.4219 58.5625 28.6094 32.5469
Length   18, alignment  0, c 130:       40.4062 58.6094 26.5938 28.0938
Length   19, alignment  3, c 130:       43.4062 60.5625 29.625  33.6875
Length   19, alignment  0, c 130:       43.375  60.6094 29.5469 30.5469
Length   20, alignment  4, c 130:       41.4062 62.75   27.7031 31.2344
Length   20, alignment  0, c 130:       40.4062 62.5625 26.5781 27.5781
Length   21, alignment  5, c 130:       45.4062 64.75   31.6094 34.5938
Length   21, alignment  0, c 130:       41.4219 64.6094 27.5938 28.5938
Length   22, alignment  6, c 130:       44.4219 66.5625 30.6094 32.5938
Length   22, alignment  0, c 130:       41.4062 66.8906 27.5781 28.5781
Length   23, alignment  7, c 130:       46.4062 68.6094 32.6875 33.5781
Length   23, alignment  0, c 130:       43.6094 68.7812 29.6562 30.5625
Length   24, alignment  0, c 130:       40.4062 70.6094 26.6719 27.5781
Length   24, alignment  0, c 130:       40.4062 70.5469 26.6719 27.5625
Length   25, alignment  1, c 130:       44.5625 72.6406 30.6094 35.5469
Length   25, alignment  0, c 130:       41.4531 72.6094 27.5938 28.6875
Length   26, alignment  2, c 130:       43.9688 74.75   30.6094 32.5625
Length   26, alignment  0, c 130:       41.7969 74.5625 27.6875 28.6094
Length   27, alignment  3, c 130:       45.8438 76.5625 31.5938 34.6719
Length   27, alignment  0, c 130:       44.7344 76.6094 30.5469 31.5469
Length   28, alignment  4, c 130:       43.4531 78.8281 29.6094 32.5938
Length   28, alignment  0, c 130:       41.4062 78.6094 27.5781 28.5781
Length   29, alignment  5, c 130:       47.4688 80.6094 33.6094 35.5938
Length   29, alignment  0, c 130:       42.4375 80.6094 28.5938 29.5938
Length   30, alignment  6, c 130:       46.5    82.5625 32.6094 33.7656
Length   30, alignment  0, c 130:       42.4219 82.6094 28.5781 29.6562
Length   31, alignment  7, c 130:       48.4688 84.5625 34.5938 34.6719
Length   31, alignment  0, c 130:       44.4062 84.8594 30.5625 31.5625
Length   14, alignment  1, c 130:       36.5    50.8594 26.6875 34.5625
Length 1024, alignment  3, c 130:       150.406 2081.19 133.812 217.094
Length   64, alignment  4, c 130:       50.8594 150.672 40.5625 49.2031
Length   25, alignment  2, c 130:       44.4375 72.7969 30.25   35.1719
builtin_memset  simple_memset   __memset_e6500  __memset_ppc __memset_ppc_def [powerpc32/memset.S which gets picked by default]
Length    1, alignment  0, c -65:       14.6094 11.2031 11.4062 10.5469 10.5625
Length    2, alignment  0, c -65:       14.5781 13.5625 11.4375 11.5469 11.5625
Length    4, alignment  0, c -65:       16.5938 19.0156 14.9531 14.4062 14.9531
Length    8, alignment  0, c -65:       19.5625 41.6875 15.5    17.5156 16.5312
Length   16, alignment  0, c -65:       22.5312 51.5938 15.5625 17.4844 16.5938
Length   32, alignment  0, c -65:       27.5469 83.8125 24.5312 24.4531 24.5312
Length   64, alignment  0, c -65:       32.4844 147.469 28.5    33.6406 34.2344
Length  128, alignment  0, c -65:       31.9531 276.797 30.1875 52.4531 52.0625
Length  256, alignment  0, c -65:       43.3125 799.562 40.2344 100.656 100.672
Length  512, alignment  0, c -65:       77.5    1043.42 74.4688 172.672 176.938
Length 1024, alignment  0, c -65:       118.547 2067.42 115.422 328.328 328.625
Length 2048, alignment  0, c -65:       210.703 4115.42 207.422 634.516 634.703
Length 4096, alignment  0, c -65:       394.625 8211.42 391.578 1246.5  1246.61
Length 8192, alignment  0, c -65:       762.703 16818.8 759.734 2485    2476.7
Length 16384, alignment  0, c -65:      1498.84 32787.7 1495.75 4935.83 4944.64
Length 32768, alignment  0, c -65:      2970.92 66092.8 2967.75 11296.8 12335.1
Length 65536, alignment  0, c -65:      5915.28 131978  5911.67 24103.9 24106.7
Length 131072, alignment  0, c -65:     11803.6 266883  11800.2 49666.7 49668
Length    1, alignment  1, c -65:       14.5156 11.1406 10.6875 10.5156 10.5
Length    2, alignment  2, c -65:       14.6094 12.5312 11.5625 12.6562 11.4844
Length    3, alignment  3, c -65:       15.5781 17.125  13.4375 13.5469 13.4375
Length    3, alignment  0, c -65:       15.5    16.9531 13.4375 13.4688 13.4375
Length    4, alignment  4, c -65:       16.6094 19.4531 14.9531 14.3281 14.9531
Length    5, alignment  5, c -65:       23.625  20.8594 19.5    20.5    20.4531
Length    5, alignment  0, c -65:       23.5312 20.5    19.4844 21.5312 20.4844
Length    6, alignment  6, c -65:       20.5156 23.25   16.5469 20.3906 20.4688
Length    6, alignment  0, c -65:       20.5312 23.0781 16.4531 17.5312 16.5469
Length    7, alignment  7, c -65:       23.5938 25.0469 17.625  22.4219 21.4375
Length    7, alignment  0, c -65:       21.5469 24.7188 17.6094 18.5312 17.5469
Length    8, alignment  0, c -65:       19.6094 41.4375 15.5    17.5469 16.6406
Length    9, alignment  1, c -65:       20.625  44.4062 17.5938 20.5312 20.5312
Length    9, alignment  0, c -65:       19.6094 43.2344 16.5    18.6094 17.625
Length   10, alignment  2, c -65:       20.5781 46.5156 17.5156 21.4219 21.4219
Length   10, alignment  0, c -65:       20.6875 46.5156 16.5312 18.5312 17.5469
Length   11, alignment  3, c -65:       25.4531 49.3906 18.6094 22.0625 21.4531
Length   11, alignment  0, c -65:       22.5312 49.3281 17.5469 18.5625 18.5781
Length   12, alignment  4, c -65:       23.4062 51.1719 16.5156 18.5156 17.4531
Length   12, alignment  0, c -65:       20.5625 48.1719 16.5156 18.5469 17.5312
Length   13, alignment  5, c -65:       26.4219 50.1094 19.5156 22.4844 22.4844
Length   13, alignment  0, c -65:       23.4531 45.75   19.4844 21.5    20.5156
Length   14, alignment  6, c -65:       26.4062 47.4219 19.4844 21.4688 21.4688
Length   14, alignment  0, c -65:       24.375  47.7656 17.5938 19.5312 18.5469
Length   15, alignment  7, c -65:       27.3906 49.7188 20.5156 22.5312 22.6406
Length   15, alignment  0, c -65:       25.3438 49.6875 18.6719 20.6094 19.5469
Length   16, alignment  0, c -65:       22.5312 51.7188 15.4688 17.5781 16.5938
Length   17, alignment  1, c -65:       27.7656 53.4219 20.4688 23.5469 23.4688
Length   17, alignment  0, c -65:       23.4688 53.7188 17.5625 20.5469 19.5625
Length   18, alignment  2, c -65:       28.5    55.4688 20.7031 20.5312 20.6406
Length   18, alignment  0, c -65:       25.5156 289.422 19      20.6406 19.5625
Length   19, alignment  3, c -65:       28.5312 57.4062 21.6562 22.6406 22.9219
Length   19, alignment  0, c -65:       24.5156 57.7188 18.7656 20.5781 19.4844
Length   20, alignment  4, c -65:       23.5    59.7344 16.6719 17.5156 17.5938
Length   20, alignment  0, c -65:       23.5    59.7344 16.5625 17.7344 17.5938
Length   21, alignment  5, c -65:       30.5    61.8281 23.6406 23.6562 23.375
Length   21, alignment  0, c -65:       24.5469 61.8281 18.5625 20.4844 19.5781
Length   22, alignment  6, c -65:       30.5    63.7812 23.4531 21.5312 21.5312
Length   22, alignment  0, c -65:       24.8906 63.7656 18.5312 19.6094 19.5625
Length   23, alignment  7, c -65:       31.3906 65.7656 24.5938 24.4688 23.4844
Length   23, alignment  0, c -65:       25.5156 65.8281 19.5469 20.5938 20.6719
Length   24, alignment  0, c -65:       24.5    67.7031 17.5312 19.625  18.6406
Length   24, alignment  0, c -65:       24.4375 67.7656 17.5312 19.5625 18.5625
Length   25, alignment  1, c -65:       31.5938 69.7344 24.625  23.6406 23.5469
Length   25, alignment  0, c -65:       25.5    69.7969 18.5781 20.6406 19.5938
Length   26, alignment  2, c -65:       32.4531 71.7969 24.6719 22.5781 22.5
Length   26, alignment  0, c -65:       26.5    71.4219 20.0312 20.5938 20.1562
Length   27, alignment  3, c -65:       32.7344 73.7969 25.5781 25.4844 23.6875
Length   27, alignment  0, c -65:       26.5156 73.7969 20.5625 21.5625 21.5312
Length   28, alignment  4, c -65:       26.375  75.8281 19.4844 20.5625 19.4688
Length   28, alignment  0, c -65:       26.4844 75.4219 19.4844 20.5625 19.5625
Length   29, alignment  5, c -65:       34.4688 77.9219 27.5312 24.5    24.4062
Length   29, alignment  0, c -65:       26.5    77.8906 19.5781 21.6719 20.5
Length   30, alignment  6, c -65:       34.5312 79.9219 27.5    23.5    23.5
Length   30, alignment  0, c -65:       27.4062 79.9219 20.5469 21.5625 21.0469
Length   31, alignment  7, c -65:       35.7969 81.9062 28.6094 24.6406 24.5
Length   31, alignment  0, c -65:       28.5    81.8594 21.5156 22.5625 22.5625
Length   14, alignment  1, c -65:       25.4531 47.6719 18.5312 23.5312 23.5156
Length 1024, alignment  3, c -65:       138.109 2078.27 136.891 351.266 345.766
Length   64, alignment  4, c -65:       36.7031 148.297 36.6094 40.5156 39.6406
Length   25, alignment  2, c -65:       31.5938 69.7969 24.625  23.5312 23.5312
Length    1, alignment  0, c  0:        14.5156 11.125  10.6875 10.6719 10.5469
Length    2, alignment  0, c  0:        14.5781 12.5312 11.6094 11.4688 11.5938
Length    4, alignment  0, c  0:        16.6094 19.1406 15.0469 14.4844 14.9375
Length    8, alignment  0, c  0:        19.6094 41.7031 15.5    17.8594 16.5312
Length   16, alignment  0, c  0:        22.5    51.7344 15.6719 17.5938 16.7031
Length   32, alignment  0, c  0:        27.6406 83.4219 24.5312 31.0781 37.5
Length   64, alignment  0, c  0:        34.4688 147.422 30.4844 39.6719 38.5625
Length  128, alignment  0, c  0:        36.0625 275.422 30.7656 31.625  43.7969
Length  256, alignment  0, c  0:        40.25   531.422 36.9688 36.9688 54.1562
Length  512, alignment  0, c  0:        55.4688 1043.42 52.4219 46.9375 73.8281
Length 1024, alignment  0, c  0:        71.4688 2067.42 68.4219 67.3125 117.719
Length 2048, alignment  0, c  0:        108.172 4115.47 103.312 110.875 197.562
Length 4096, alignment  0, c  0:        191.047 8254.12 184.625 190.719 357.641
Length 8192, alignment  0, c  0:        360.375 16761.9 354.484 350.766 678.172
Length 16384, alignment  0, c  0:       701.016 32787.7 696.438 670.953 1318.34
Length 32768, alignment  0, c  0:       1384.94 65885.9 1378.94 1311.03 2598.17
Length 65536, alignment  0, c  0:       2748.91 132272  2744.48 2590.86 5158.16
Length 131072, alignment  0, c  0:      5481.11 264271  5475.2  5151.02 10278.4
Length    1, alignment  1, c  0:        15.1406 11      10.6406 10.625  10.6094
Length    2, alignment  2, c  0:        14.6094 13.5781 11.5625 11.5469 11.5938
Length    3, alignment  3, c  0:        15.5938 16.9219 13.4375 13.75   13.4375
Length    3, alignment  0, c  0:        15.5938 16.6719 13.4375 13.4688 13.5156
Length    4, alignment  4, c  0:        16.5156 19.25   14.9844 14.4062 14.9531
Length    5, alignment  5, c  0:        23.5312 21.3594 19.5781 20.4531 20.4531
Length    5, alignment  0, c  0:        23.4688 21.0156 19.4844 21.4844 20.4844
Length    6, alignment  6, c  0:        20.5781 22.8438 16.5469 20.4688 20.5469
Length    6, alignment  0, c  0:        20.5625 23.1406 16.5469 17.5312 16.625
Length    7, alignment  7, c  0:        23.5781 25.4375 17.7188 22.4219 21.4375
Length    7, alignment  0, c  0:        21.5469 24.6094 17.5938 18.5312 17.5469
Length    8, alignment  0, c  0:        19.4844 41.6719 15.5    17.5312 16.5781
Length    9, alignment  1, c  0:        20.6406 44.3438 17.625  20.6094 20.5312
Length    9, alignment  0, c  0:        19.7188 44.4062 16.5    18.6875 17.5312
Length   10, alignment  2, c  0:        20.6406 46.3594 17.5156 21.4688 21.4219
Length   10, alignment  0, c  0:        20.5156 46.3594 16.5156 18.6094 17.5312
Length   11, alignment  3, c  0:        25.4688 49.3906 18.5156 21.9688 21.5312
Length   11, alignment  0, c  0:        21.5625 49.3281 17.5156 18.6562 18.5312
Length   12, alignment  4, c  0:        23.4219 48.0781 16.5156 18.5625 17.5312
Length   12, alignment  0, c  0:        20.4844 47.8906 16.5781 18.625  17.6094
Length   13, alignment  5, c  0:        26.4844 45.8594 19.5938 22.4531 22.5156
Length   13, alignment  0, c  0:        23.5312 45.75   19.5938 21.6406 20.5625
Length   14, alignment  6, c  0:        26.4062 47.4219 19.4844 21.625  21.4688
Length   14, alignment  0, c  0:        24.375  47.6562 17.5156 19.5312 18.5469
Length   15, alignment  7, c  0:        27.3906 49.6875 20.4062 22.5    22.5469
Length   15, alignment  0, c  0:        25.375  49.5781 18.6719 20.5625 19.5469
Length   16, alignment  0, c  0:        22.5312 51.7812 15.6406 17.5781 16.6094
Length   17, alignment  1, c  0:        27.6094 53.6719 20.5781 23.4688 23.4688
Length   17, alignment  0, c  0:        23.5469 53.5938 17.5625 20.5312 19.6875
Length   18, alignment  2, c  0:        28.5312 55.4219 20.6094 20.5312 20.4219
Length   18, alignment  0, c  0:        25.5    55.7031 18.6406 20.5625 19.4688
Length   19, alignment  3, c  0:        28.5625 57.7188 21.8281 22.6406 23
Length   19, alignment  0, c  0:        25.5469 57.6719 19.5625 20.5625 19.4844
Length   20, alignment  4, c  0:        23.5312 59.4219 16.5625 17.625  17.5938
Length   20, alignment  0, c  0:        23.4531 59.6094 16.6719 17.6562 17.5938
Length   21, alignment  5, c  0:        30.4688 61.8125 23.5469 23.4844 23.375
Length   21, alignment  0, c  0:        24.5312 61.8125 18.4688 20.5781 19.5781
Length   22, alignment  6, c  0:        30.5    63.7188 23.5156 21.5312 21.5312
Length   22, alignment  0, c  0:        24.5156 63.8438 18.5312 19.5938 19.5781
Length   23, alignment  7, c  0:        31.4219 65.7656 24.5625 24.5156 23.5625
Length   23, alignment  0, c  0:        25.5469 65.7031 19.5312 20.4844 20.5625
Length   24, alignment  0, c  0:        24.5    67.8594 17.5312 19.5625 18.6406
Length   24, alignment  0, c  0:        24.8438 67.8594 17.5312 19.4688 18.5625
Length   25, alignment  1, c  0:        31.5469 69.7969 24.5469 23.5312 23.6094
Length   25, alignment  0, c  0:        25.4531 69.75   18.5625 20.4844 19.5156
Length   26, alignment  2, c  0:        32.4375 71.4219 24.4844 22.5    22.5
Length   26, alignment  0, c  0:        26.5    71.7969 20.0156 20.5    20.2656
Length   27, alignment  3, c  0:        32.5    73.4219 25.5156 25.5625 24.4844
Length   27, alignment  0, c  0:        26.5156 73.7969 20.5156 21.5625 21.5469
Length   28, alignment  4, c  0:        26.4062 75.4219 19.4844 20.5625 19.5938
Length   28, alignment  0, c  0:        26.4062 75.8125 19.4844 20.5469 19.5781
Length   29, alignment  5, c  0:        34.4531 77.9219 27.5156 24.5    24.5
Length   29, alignment  0, c  0:        26.4375 77.9219 19.5625 21.5781 20.8125
Length   30, alignment  6, c  0:        34.4531 80.1719 27.4844 23.5    23.5
Length   30, alignment  0, c  0:        27.4062 79.8281 20.5156 21.5625 21.0469
Length   31, alignment  7, c  0:        35.5156 81.4219 28.5312 24.5312 24.5
Length   31, alignment  0, c  0:        28.4062 81.4219 21.5156 22.5625 22.5625
Length   14, alignment  1, c  0:        25.5    47.7656 18.5938 23.4531 23.4844
Length 1024, alignment  3, c  0:        81.0469 2078.2  77.5938 114.203 137.5
Length   64, alignment  4, c  0:        36.6094 148.219 36.6094 46.4062 51.5312
Length   25, alignment  2, c  0:        31.5469 69.4219 24.5469 23.5312 23.5312
Length    1, alignment  0, c 65:        14.4531 11      10.6875 10.6094 10.5
Length    2, alignment  0, c 65:        14.5    13.5781 11.5625 11.5469 12.7969
Length    4, alignment  0, c 65:        16.6094 19.2188 14.9844 14.4062 14.9375
Length    8, alignment  0, c 65:        19.5625 41.6875 15.5    17.5156 16.5781
Length   16, alignment  0, c 65:        22.5312 51.6875 15.5625 17.4688 16.5938
Length   32, alignment  0, c 65:        30.5    83.8594 24.5312 24.5625 24.5469
Length   64, alignment  0, c 65:        32.4844 147.422 28.4219 33.6562 33.6094
Length  128, alignment  0, c 65:        32.2812 275.422 30.1562 52.0781 52.2031
Length  256, alignment  0, c 65:        43.4531 531.359 39.7812 94.5156 100.688
Length  512, alignment  0, c 65:        77.5    1043.42 74.4688 172.641 179.516
Length 1024, alignment  0, c 65:        118.547 2078.12 115.766 328.547 331.469
Length 2048, alignment  0, c 65:        210.531 4115.42 207.422 634.734 638.672
Length 4096, alignment  0, c 65:        394.688 8211.47 391.422 1253.52 1256.94
Length 8192, alignment  0, c 65:        762.531 16403.4 759.547 2500.3  2476.83
Length 16384, alignment  0, c 65:       1498.84 33426.6 1495.59 4943.62 5672.77
Length 32768, alignment  0, c 65:       2970.77 66040.2 2967.59 11326.5 12076.8
Length 65536, alignment  0, c 65:       5914.77 132212  5911.67 24444.1 25305.6
Length 131072, alignment  0, c 65:      11802.8 263697  12010.2 49610.2 50467
Length    1, alignment  1, c 65:        14.5156 11.125  10.6875 10.5    10.625
Length    2, alignment  2, c 65:        14.5    13.5781 11.5625 11.5469 11.5156
Length    3, alignment  3, c 65:        15.5781 16.75   13.5156 13.5    13.4375
Length    3, alignment  0, c 65:        15.5781 17.0938 13.5156 13.5    13.4375
Length    4, alignment  4, c 65:        16.5938 19.375  15.0312 14.4062 15.0625
Length    5, alignment  5, c 65:        23.5312 21.7031 19.5312 20.3906 20.5
Length    5, alignment  0, c 65:        23.4062 20.8125 19.4844 21.4844 20.5938
Length    6, alignment  6, c 65:        20.5938 23.25   16.5938 20.4531 20.5156
Length    6, alignment  0, c 65:        20.5312 23.1406 16.5469 17.4531 16.5469
Length    7, alignment  7, c 65:        23.6406 24.7188 17.6562 22.4219 21.4531
Length    7, alignment  0, c 65:        21.6094 24.7188 17.625  18.625  17.6406
Length    8, alignment  0, c 65:        19.5156 41.5156 15.5    17.5469 16.5312
Length    9, alignment  1, c 65:        20.6406 43.4375 17.5156 20.7031 20.5312
Length    9, alignment  0, c 65:        19.6094 43.2344 16.4219 18.5625 17.5938
Length   10, alignment  2, c 65:        20.6406 46.3125 17.5156 21.4219 21.4219
Length   10, alignment  0, c 65:        20.5625 46.5156 16.4531 18.4531 17.625
Length   11, alignment  3, c 65:        25.3906 49.3906 18.5312 21.9062 21.4531
Length   11, alignment  0, c 65:        21.5625 48.4219 17.5312 18.5781 18.625
Length   12, alignment  4, c 65:        23.4688 51.3438 16.5156 18.5625 17.5312
Length   12, alignment  0, c 65:        20.5625 47.9531 16.4844 18.5625 17.6094
Length   13, alignment  5, c 65:        26.4844 50.1094 19.5938 22.4531 22.4531
Length   13, alignment  0, c 65:        23.5156 45.75   19.4844 21.5156 20.4844
Length   14, alignment  6, c 65:        26.3906 47.4219 19.4844 21.4688 21.4688
Length   14, alignment  0, c 65:        24.7188 47.4219 17.5625 19.5312 18.7344
Length   15, alignment  7, c 65:        27.7188 49.6875 20.4844 22.5    22.4688
Length   15, alignment  0, c 65:        25.375  49.625  18.4844 20.6406 19.5469
Length   16, alignment  0, c 65:        22.5    51.7031 15.6406 17.6094 16.625
Length   17, alignment  1, c 65:        27.625  53.7031 20.5781 23.4688 23.5469
Length   17, alignment  0, c 65:        23.4688 53.6719 17.5625 20.5469 19.4531
Length   18, alignment  2, c 65:        28.5    55.6406 20.7188 20.5312 20.4375
Length   18, alignment  0, c 65:        25.4531 55.7031 18.5625 20.5625 19.5625
Length   19, alignment  3, c 65:        28.7812 57.4219 21.625  22.5625 23
Length   19, alignment  0, c 65:        25.5312 57.4688 19.6406 21      19.5938
Length   20, alignment  4, c 65:        23.5312 59.4219 16.5625 17.5156 17.6719
Length   20, alignment  0, c 65:        23.5    59.7344 16.5781 17.625  17.5938
Length   21, alignment  5, c 65:        30.4688 61.7656 23.6406 23.4844 23.4844
Length   21, alignment  0, c 65:        24.5312 61.8281 18.5625 20.5781 19.5781
Length   22, alignment  6, c 65:        30.4531 63.7812 23.6094 21.5312 21.5312
Length   22, alignment  0, c 65:        24.5469 63.8438 18.6406 19.5938 19.5625
Length   23, alignment  7, c 65:        31.5469 65.9219 24.5156 24.3906 23.5
Length   23, alignment  0, c 65:        25.8125 65.7656 19.5312 20.625  20.5938
Length   24, alignment  0, c 65:        24.4375 68.0312 17.5469 19.4531 18.5938
Length   24, alignment  0, c 65:        24.4688 67.7812 17.6094 19.5469 18.5625
Length   25, alignment  1, c 65:        31.5    69.7969 24.4531 23.5312 23.5312
Length   25, alignment  0, c 65:        25.4219 69.7969 18.5938 20.5781 19.6094
Length   26, alignment  2, c 65:        32.4375 71.4219 24.5781 22.5    22.5
Length   26, alignment  0, c 65:        26.5    71.7812 20.0312 20.5938 20.25
Length   27, alignment  3, c 65:        32.6875 73.7969 25.5781 25.4844 23.6406
Length   27, alignment  0, c 65:        26.5312 73.4219 20.5625 21.4688 21.4531
Length   28, alignment  4, c 65:        26.4062 75.4688 19.4844 20.5469 19.5625
Length   28, alignment  0, c 65:        26.4062 75.4688 19.4844 20.6406 19.5625
Length   29, alignment  5, c 65:        34.4688 77.8281 27.5312 24.5156 24.5
Length   29, alignment  0, c 65:        26.4375 77.9219 19.4688 21.6406 20.5
Length   30, alignment  6, c 65:        34.4531 79.9219 27.4844 23.5    23.5
Length   30, alignment  0, c 65:        27.4844 79.4219 20.5156 21.5625 20.9531
Length   31, alignment  7, c 65:        35.4219 81.9219 28.5781 24.6094 24.5
Length   31, alignment  0, c 65:        28.4844 81.375  21.5781 22.5625 22.5625
Length   14, alignment  1, c 65:        25.5625 47.6094 18.5312 23.8594 23.4531
Length 1024, alignment  3, c 65:        138.266 2078.14 136.984 343.625 345.594
Length   64, alignment  4, c 65:        36.75   148.219 36.375  40.4062 39.4375
Length   25, alignment  2, c 65:        31.5156 69.7969 24.5469 23.4219 23.5312
Length    1, alignment  0, c 130:       14.5156 11      10.6719 10.8438 10.5625
Length    2, alignment  0, c 130:       14.5781 12.6562 11.5625 11.5469 11.4844
Length    4, alignment  0, c 130:       16.5938 19.1406 14.9844 14.4062 14.5625
Length    8, alignment  0, c 130:       19.5625 41.6875 15.5781 17.5781 16.5938
Length   16, alignment  0, c 130:       22.5    51.7031 15.6719 17.5938 16.6719
Length   32, alignment  0, c 130:       27.9531 83.8438 24.5312 24.5625 24.6406
Length   64, alignment  0, c 130:       32.4844 147.469 28.4375 33.6562 33.5938
Length  128, alignment  0, c 130:       32.6094 275.422 29.7969 52.0781 52.1094
Length  256, alignment  0, c 130:       43.2344 531.422 40.2656 100.672 100.578
Length  512, alignment  0, c 130:       71.5938 1043.47 74.4375 180.75  172.781
Length 1024, alignment  0, c 130:       118.516 2067.42 115.375 332.656 328.344
Length 2048, alignment  0, c 130:       210.5   4115.47 207.609 634.859 634.828
Length 4096, alignment  0, c 130:       394.578 8211.42 391.469 1253.66 1246.8
Length 8192, alignment  0, c 130:       762.5   16403.5 759.5   2479.52 2476.89
Length 16384, alignment  0, c 130:      1498.69 33177.5 1495.78 4943.64 5673.23
Length 32768, alignment  0, c 130:      2970.77 65819.1 2967.75 11326.7 12077
Length 65536, alignment  0, c 130:      5914.75 131939  5911.75 24414.6 24876.8
Length 131072, alignment  0, c 130:     11802.9 264177  12011   49666.8 50467.1
Length    1, alignment  1, c 130:       14.5156 11.2969 10.6094 10.5469 10.5625
Length    2, alignment  2, c 130:       14.6094 12.5312 11.5    11.4688 11.5625
Length    3, alignment  3, c 130:       15.5781 17.0625 13.4375 13.4688 13.4375
Length    3, alignment  0, c 130:       15.5    16.5312 13.5156 13.5    13.5156
Length    4, alignment  4, c 130:       16.5938 19.4688 14.9688 14.4062 14.9375
Length    5, alignment  5, c 130:       23.4688 21.25   19.4688 20.5    20.375
Length    5, alignment  0, c 130:       23.4688 21.1094 19.4844 21.4844 20.4844
Length    6, alignment  6, c 130:       20.5156 22.6094 16.5469 20.4688 20.4688
Length    6, alignment  0, c 130:       20.5625 23.0625 16.5469 17.5312 16.5469
Length    7, alignment  7, c 130:       23.5938 24.5469 17.7031 22.5781 21.4062
Length    7, alignment  0, c 130:       21.5312 25.0781 17.5625 18.6562 17.4688
Length    8, alignment  0, c 130:       19.5625 41.4062 15.4219 17.5312 16.5312
Length    9, alignment  1, c 130:       20.7031 43.3281 17.5156 20.4531 20.5312
Length    9, alignment  0, c 130:       19.5312 44.4062 16.5    18.5156 17.625
Length   10, alignment  2, c 130:       20.5625 46.3594 17.5156 21.4531 21.4219
Length   10, alignment  0, c 130:       20.5625 46.3594 16.5156 18.5156 17.5312
Length   11, alignment  3, c 130:       25.4688 49.3281 18.5156 21.9688 21.5156
Length   11, alignment  0, c 130:       21.5625 49.3906 17.5156 18.6562 18.4531
Length   12, alignment  4, c 130:       23.4219 51.1719 16.5156 18.6406 17.4531
Length   12, alignment  0, c 130:       20.5625 48.0781 16.5156 18.5156 17.5469
Length   13, alignment  5, c 130:       26.4062 45.5938 19.5312 22.5312 22.5312
Length   13, alignment  0, c 130:       23.5156 45.5938 19.4844 21.4844 20.4844
Length   14, alignment  6, c 130:       26.4062 47.6719 19.5    21.4688 21.4688
Length   14, alignment  0, c 130:       24.375  47.4219 17.5156 19.5312 18.5781
Length   15, alignment  7, c 130:       27.4062 49.625  20.75   22.5312 22.4688
Length   15, alignment  0, c 130:       25.375  49.6875 18.5625 20.5625 19.5469
Length   16, alignment  0, c 130:       22.5312 51.7031 15.6719 17.5781 16.6875
Length   17, alignment  1, c 130:       27.5469 53.6562 20.6875 23.4688 23.5469
Length   17, alignment  0, c 130:       23.5469 53.6406 17.5781 20.625  19.6406
Length   18, alignment  2, c 130:       28.5    55.7188 20.6094 20.5312 20.5469
Length   18, alignment  0, c 130:       25.4219 55.7031 18.5625 20.5625 19.5
Length   19, alignment  3, c 130:       28.5156 57.9531 21.6094 22.5625 23.3438
Length   19, alignment  0, c 130:       25.7344 57.6406 19.5781 20.4688 19.5938
Length   20, alignment  4, c 130:       23.8438 59.7344 16.5625 17.6562 17.5938
Length   20, alignment  0, c 130:       23.5    59.625  16.5625 17.5156 17.5938
Length   21, alignment  5, c 130:       30.5    61.8281 23.625  23.4844 23.5
Length   21, alignment  0, c 130:       24.5625 61.75   18.6406 20.5781 19.5781
Length   22, alignment  6, c 130:       30.4531 63.8438 23.5156 21.5312 21.5312
Length   22, alignment  0, c 130:       24.4688 64.0469 18.5312 19.6094 19.5625
Length   23, alignment  7, c 130:       31.5    65.7656 24.5156 24.5469 23.3906
Length   23, alignment  0, c 130:       25.5625 65.4062 19.5312 20.6094 20.5625
Length   24, alignment  0, c 130:       24.4219 67.7656 17.625  19.4688 18.4688
Length   24, alignment  0, c 130:       24.5    68.0625 17.5312 19.5469 18.5625
Length   25, alignment  1, c 130:       31.5312 69.75   24.4531 23.5312 23.625
Length   25, alignment  0, c 130:       25.5312 69.7969 18.5625 20.5781 19.6094
Length   26, alignment  2, c 130:       32.3906 71.7344 24.5781 22.5    22.5
Length   26, alignment  0, c 130:       26.5469 71.4219 20.0312 20.5156 20.2656
Length   27, alignment  3, c 130:       32.7188 73.3594 25.5781 25.4844 24.4844
Length   27, alignment  0, c 130:       26.5469 73.7656 20.5625 21.4688 21.6094
Length   28, alignment  4, c 130:       26.4062 75.7344 19.3906 20.4531 19.5625
Length   28, alignment  0, c 130:       26.5    75.4688 19.5781 20.625  19.5625
Length   29, alignment  5, c 130:       34.6094 77.8281 27.4375 24.5156 24.5
Length   29, alignment  0, c 130:       26.4844 77.8281 19.5625 21.5781 20.5938
Length   30, alignment  6, c 130:       34.4688 79.4688 27.4844 23.5    23.5
Length   30, alignment  0, c 130:       27.4219 79.3594 20.5156 21.5625 20.9688
Length   31, alignment  7, c 130:       35.5    81.4688 28.5312 24.5312 24.5
Length   31, alignment  0, c 130:       28.4062 81.4219 21.4375 22.5625 22.5312
Length   14, alignment  1, c 130:       25.4375 47.4219 18.4219 23.4531 23.5938
Length 1024, alignment  3, c 130:       138.266 2078.27 137.125 343.656 345.766
Length   64, alignment  4, c 130:       36.75   148.219 36.375  40.5156 39.4375
Length   25, alignment  2, c 130:       31.6094 69.7344 24.4531 23.6094 23.4219

Patch
diff mbox

diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/e6500/memset.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/e6500/memset.S
--- glibc-2.20/sysdeps/powerpc/powerpc32/e6500/memset.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/e6500/memset.S	2015-08-29 16:00:45.023478670 -0500
@@ -0,0 +1,257 @@ 
+/* Optimized memset implementation for e6500 32-bit PowerPC.
+
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+   Returns 's'.  */
+
+#define rTMP	r0
+#define rRTN	r3	/* initial value of 1st argument.  */
+#define rMEMP0	r3	/* original value of 1st arg.  */
+#define rCHR	r4	/* char to set in each byte.  */
+#define rLEN	r5	/* length of region to set.  */
+#define rMEMP	r6	/* address at which we are storing.  */
+#define rALIGN	r7	/* no. of bytes we are setting now (when aligning).  */
+#define rPOS16	r7	/* constant +16.  */
+#define rPOS32	r8	/* constant +32.  */
+#define rPOS48	r9	/* constant +48.  */
+#define rGOT	r9	/* Address of the Global Offset Table.  */
+#define rCLS	r9	/* Cache line size obtained from static.  */
+#define rCTR2	r7
+#define rCTR1	r11
+#define rTMP1	r12
+#define vCHR	v14	/* char to set in each byte.  */
+#define vTMP1	v15
+#define vTMP2	v16
+
+	.section ".text"
+EALIGN (memset, 5, 1)
+	cmplwi	cr1, rLEN, 4
+	cmplwi	cr5, rLEN, 32
+	mr	rMEMP, rMEMP0
+	ble	cr1, L(small)
+	rlwimi	rCHR, rCHR, 8, 16, 23
+	rlwimi	rCHR, rCHR, 16, 0, 15
+	blt	cr5, L(medium)
+	neg	rTMP, rMEMP
+	andi.	rTMP, rTMP, 15
+	bne	L(nalign16)
+L(align16):
+	cmplwi	7, rLEN, 63
+	rlwinm.	rTMP1, rCHR, 28, 28, 3
+	li	rPOS16, 16
+	ble	7, L(copy_remaining)
+	beq	L(check_cache_line_size)
+L(vec_nz):
+	srwi	rCTR1, rLEN, 6		/* No of 64 byte copy count.  */
+	rlwinm	rLEN, rLEN, 0, 26, 31	/* remaining bytes.  */
+	vxor	vCHR, vCHR, vCHR
+	mtctr	rCTR1			/* move count.  */
+	lvsl	vCHR, 0, rTMP1		/* LSU Move upper
+					   nibble to byte 0 of VR.  */
+	vspltisb	vTMP1, 4	/* VPU Splat 0x4 to every byte.  */
+	lvsl	vTMP2, 0, rCHR		/* LSU Move lower
+					   nibble to byte 0 of VR.  */
+	vslb	vCHR, vCHR, vTMP1	/* VIU Move upper nibble to VR[0:3].  */
+	vor	vCHR, vCHR, vTMP2	/* VIU Form FILL byte in VR[0:7].  */
+	vspltb	vCHR, vCHR, 0		/* VPU Splat the fill
+					   byte to all bytes.  */
+	li	rPOS32, 32
+	li	rPOS48, 48
+L(vnz_loop):
+	stvx	vCHR, 0, rMEMP
+	stvx	vCHR, rPOS16, rMEMP
+	stvx	vCHR, rPOS32, rMEMP
+	stvx	vCHR, rPOS48, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vnz_loop)
+L(copy_remaining):
+	srwi.	rCTR1, rLEN, 3		/* No of 8 byte copy count.  */
+	rlwinm	rLEN, rLEN, 0, 29, 31	/* remaining bytes.  */
+	cmplwi	cr1, rLEN, 1
+	bne	0, L(copy_words)
+L(copy_bytes):
+	bltlr	cr1
+	cmplwi	cr0, rLEN, 4
+	beq	cr1, 2f			/* nb <= 1? (0, 1 bytes).  */
+	bgt	cr0, 1f			/* nb > 4?  (5, 6, 7 bytes).  */
+	addi	rTMP, rLEN, -2		/* 2, 3, 4 bytes.  */
+	sth	rCHR, 0(rMEMP)
+	sthx	rCHR, rMEMP, rTMP
+	blr
+1:
+	addi	rTMP, rLEN, -4		/* 5, 6, 7 bytes.  */
+	stw	rCHR, 0(rMEMP)
+	stwx	rCHR, rMEMP, rTMP
+	blr
+2:	stb	rCHR, 0(rMEMP)
+	blr
+
+L(copy_words):
+	mtcrf	0x01, rCTR1
+	bf	cr7*4+1, 16f
+	stw	rCHR, 0(rMEMP)
+	stw	rCHR, 4(rMEMP)
+	stw	rCHR, 8(rMEMP)
+	stw	rCHR, 12(rMEMP)
+	stw	rCHR, 16(rMEMP)
+	stw	rCHR, 20(rMEMP)
+	stw	rCHR, 24(rMEMP)
+	stw	rCHR, 28(rMEMP)
+	addi	rMEMP, rMEMP, 32
+16:
+	bf	cr7*4+2, 8f
+	stw	rCHR, 0(rMEMP)
+	stw	rCHR, 4(rMEMP)
+	stw	rCHR, 8(rMEMP)
+	stw	rCHR, 12(rMEMP)
+	addi	rMEMP, rMEMP, 16
+8:
+	bf	cr7*4+3, L(copy_bytes)
+	stw	rCHR, 0(rMEMP)
+	stw	rCHR, 4(rMEMP)
+	bltlr	cr1
+	addi	rMEMP, rMEMP, 8
+	b	L(copy_bytes)
+
+	.align 5
+L(check_cache_line_size):
+#ifdef	SHARED
+	mflr	rTMP
+/* Establishes GOT addressability so we can load __cache_line_size
+   from static.  This value was set from the aux vector during startup.  */
+	SETUP_GOT_ACCESS(rGOT,got_label_1)
+	addis	rGOT, rGOT, __cache_line_size-got_label_1@ha
+	lwz	rCLS, __cache_line_size-got_label_1@l(rGOT)
+	mtlr	rTMP
+#else
+/* Load __cache_line_size from static.  This value was set from the
+   aux vector during startup.  */
+	lis	rCLS, __cache_line_size@ha
+	lwz	rCLS, __cache_line_size@l(rCLS)
+#endif
+	cmplwi	5, rCLS, 64
+	neg	rTMP, rMEMP
+	bne	5, L(vec_nz)
+	andi.	rTMP, rTMP, 63
+	bne	L(nalign64)
+L(align64):
+	srwi	rCTR1, rLEN, 6
+	cmplwi	7, rCTR1, 32767
+	rlwinm	rLEN, rLEN, 0, 26, 31
+	mtctr	rCTR1
+	bgt	7, L(vec_zbig)
+L(vz_loop):
+	dcbzl	0, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vz_loop)
+	b	L(copy_remaining)
+
+L(vec_zbig):
+	addi	rCTR2, rCTR1, -32767
+	mtctr	rCTR2
+L(vz_big_loop):
+	dcbzl	0, rMEMP
+	dcbf	0, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vz_big_loop)
+	li	rCTR1, 32767
+	mtctr	rCTR1
+	b	L(vz_loop)
+
+L(nalign64):
+	vxor	vCHR, vCHR, vCHR
+	subf	rLEN, rTMP, rLEN
+	li	rPOS48, 48
+	li	rPOS32, 32
+	stvx	vCHR, 0, rMEMP
+	stvx	vCHR, rPOS16, rMEMP
+	cmplwi	7, rLEN, 64
+	stvx	vCHR, rPOS32, rMEMP
+	stvx	vCHR, rPOS48, rMEMP
+	add	rMEMP, rMEMP, rTMP
+	blt	7, L(copy_remaining)
+	b	L(align64)
+
+L(nalign16):
+	stw	rCHR, 0(rMEMP)
+	stw	rCHR, 4(rMEMP)
+	subf	rLEN, rTMP, rLEN
+	stw	rCHR, 8(rMEMP)
+	stw	rCHR, 12(rMEMP)
+	add	rMEMP, rMEMP, rTMP
+	b	L(align16)
+
+	.align 5
+	/* Memset of 0-4 bytes.  Taken from GLIBC default memset.  */
+L(small):
+	cmplwi	cr5, rLEN, 1
+	cmplwi	cr1, rLEN, 3
+	bltlr	cr5
+	stb	rCHR, 0(rMEMP)
+	beqlr	cr5
+	nop
+	stb	rCHR, 1(rMEMP)
+	bltlr	cr1
+	stb	rCHR, 2(rMEMP)
+	beqlr	cr1
+	nop
+	stb	rCHR, 3(rMEMP)
+	blr
+
+	/* Memset of 0-31 bytes.  Taken from GLIBC default memset.  */
+	.align 5
+L(medium):
+	mtcrf	0x01, rLEN
+	cmplwi	cr1, rLEN, 16
+	add	rMEMP, rMEMP, rLEN
+	bt	31, L(medium_31t)
+	bt	30, L(medium_30t)
+L(medium_30f):
+	bt	29, L(medium_29t)
+L(medium_29f):
+	bge	cr1, L(medium_27t)
+	bflr	28
+	stw	rCHR, -4(rMEMP)
+	stw	rCHR, -8(rMEMP)
+	blr
+L(medium_31t):
+	stbu	rCHR, -1(rMEMP)
+	bf	30, L(medium_30f)
+L(medium_30t):
+	sthu	rCHR, -2(rMEMP)
+	bf	29, L(medium_29f)
+L(medium_29t):
+	stwu	rCHR, -4(rMEMP)
+	blt	cr1, L(medium_27f)
+L(medium_27t):
+	stw	rCHR, -4(rMEMP)
+	stw	rCHR, -8(rMEMP)
+	stw	rCHR, -12(rMEMP)
+	stwu	rCHR, -16(rMEMP)
+L(medium_27f):
+	bflr	28
+L(medium_28t):
+	stw	rCHR, -4(rMEMP)
+	stw	rCHR, -8(rMEMP)
+	blr
+
+END (memset)
+libc_hidden_builtin_def (memset)
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/e6500/multiarch/rtld-memset.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/e6500/multiarch/rtld-memset.S
--- glibc-2.20/sysdeps/powerpc/powerpc32/e6500/multiarch/rtld-memset.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/e6500/multiarch/rtld-memset.S	2015-08-29 16:15:33.250533132 -0500
@@ -0,0 +1,18 @@ 
+/* Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdeps/powerpc/powerpc32/e6500/memset.S>
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c	2015-08-29 15:45:05.846419682 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c	2015-08-29 16:00:45.023478670 -0500
@@ -23,6 +23,7 @@ 
 # include "init-arch.h"
 
 extern __typeof (bzero) __bzero_ppc attribute_hidden;
+extern __typeof (bzero) __bzero_e6500 attribute_hidden;
 extern __typeof (bzero) __bzero_power6 attribute_hidden;
 extern __typeof (bzero) __bzero_power7 attribute_hidden;
 
@@ -30,7 +31,10 @@ 
             (hwcap & PPC_FEATURE_HAS_VSX)
             ? __bzero_power7 :
 	      (hwcap & PPC_FEATURE_ARCH_2_05)
-		? __bzero_power6
+		? __bzero_power6 :
+	          (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+	          && (hwcap2 & PPC_FEATURE2_HAS_ISEL))
+		    ? __bzero_e6500
             : __bzero_ppc);
 
 weak_alias (__bzero, bzero)
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-e6500.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-e6500.S
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-e6500.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-e6500.S	2015-08-29 16:00:45.023478670 -0500
@@ -0,0 +1,26 @@ 
+/* Optimized bzero implementation for PowerPC32/e6500.
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   Contributed by Luis Machado <luisgpm@br.ibm.com>.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+ENTRY (__bzero_e6500)
+        mr      r5,r4
+        li      r4,0
+        b       __memset_e6500@local
+END (__bzero_e6500)
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c	2015-08-29 15:45:37.044421872 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c	2015-08-29 16:00:45.023478670 -0500
@@ -76,6 +76,10 @@ 
 			      __memset_power7)
 	      IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_ARCH_2_05,
 			      __memset_power6)
+	      IFUNC_IMPL_ADD (array, i, memset,
+			      (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+			      && (hwcap2 & PPC_FEATURE2_HAS_ISEL)),
+			      __memset_e6500)
 	      IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ppc))
 
   /* Support sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c.  */
@@ -84,6 +88,10 @@ 
 			      __bzero_power7)
 	      IFUNC_IMPL_ADD (array, i, bzero, hwcap & PPC_FEATURE_ARCH_2_05,
 			      __bzero_power6)
+	      IFUNC_IMPL_ADD (array, i, bzero,
+			      (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+			      && (hwcap2 & PPC_FEATURE2_HAS_ISEL)),
+			      __bzero_e6500)
 	      IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ppc))
 
   /* Support sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c.  */
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile	2015-08-29 15:46:34.217426773 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile	2015-08-29 16:10:18.798514193 -0500
@@ -1,9 +1,9 @@ 
 ifeq ($(subdir),string)
 sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
 		   memcpy-e6500 memcpy-ppc32 memcmp-power7 memcmp-e6500 \
-		   memcmp-ppc32 memset-power7 memset-power6 memset-ppc32 \
-		   bzero-power7 bzero-power6 bzero-ppc32 \
-		   mempcpy-power7 mempcpy-ppc32 memchr-power7 \
+		   memcmp-ppc32 memset-power7 memset-power6 memset-e6500 \
+		   memset-ppc32 bzero-power7 bzero-power6 bzero-e6500 \
+		   bzero-ppc32 mempcpy-power7 mempcpy-ppc32 memchr-power7 \
 		   memchr-ppc32 memrchr-power7 memrchr-ppc32 rawmemchr-power7 \
 		   rawmemchr-ppc32 strlen-power7 strlen-ppc32 strnlen-power7 \
 		   strnlen-ppc32 strncmp-power7 strncmp-ppc32 \
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c	2015-08-29 15:45:05.845419682 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c	2015-08-29 16:00:45.024478649 -0500
@@ -23,6 +23,7 @@ 
 # include "init-arch.h"
 
 extern __typeof (memset) __memset_ppc attribute_hidden;
+extern __typeof (memset) __memset_e6500 attribute_hidden;
 extern __typeof (memset) __memset_power6 attribute_hidden;
 extern __typeof (memset) __memset_power7 attribute_hidden;
 
@@ -32,6 +33,9 @@ 
             (hwcap & PPC_FEATURE_HAS_VSX)
             ? __memset_power7 :
 	      (hwcap & PPC_FEATURE_ARCH_2_05)
-		? __memset_power6
+		? __memset_power6 :
+		  (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+		  && (hwcap2 & PPC_FEATURE2_HAS_ISEL))
+		    ? __memset_e6500
             : __memset_ppc);
 #endif
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/memset-e6500.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/memset-e6500.S
--- glibc-2.20/sysdeps/powerpc/powerpc32/power4/multiarch/memset-e6500.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc32/power4/multiarch/memset-e6500.S	2015-08-29 16:00:45.024478649 -0500
@@ -0,0 +1,38 @@ 
+/* Optimized memset implementation for PowerPC32/e6500.
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+#undef EALIGN
+#define EALIGN(name, alignt, words)				\
+ .globl C_SYMBOL_NAME(__memset_e6500);				\
+ .type C_SYMBOL_NAME(__memset_e6500),@function;		\
+ .align ALIGNARG(alignt);					\
+ EALIGN_W_##words;						\
+ C_LABEL(__memset_e6500)					\
+ cfi_startproc;
+
+#undef END
+#define END(name)						\
+ cfi_endproc;							\
+ ASM_SIZE_DIRECTIVE(__memset_e6500)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+
+#include <sysdeps/powerpc/powerpc32/e6500/memset.S>
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/e6500/memset.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/e6500/memset.S
--- glibc-2.20/sysdeps/powerpc/powerpc64/e6500/memset.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/e6500/memset.S	2015-08-29 16:00:45.024478649 -0500
@@ -0,0 +1,262 @@ 
+/* Optimized memset implementation for e6500 64-bit PowerPC.
+
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define rTMP	r0
+#define rRTN	r3	/* initial value of 1st argument.  */
+#define rMEMP0	r3	/* original value of 1st arg.  */
+#define rCHR	r4	/* char to set in each byte.  */
+#define rLEN	r5	/* length of region to set.  */
+#define rMEMP	r6	/* address at which we are storing.  */
+#define rALIGN	r7	/* no. of bytes we are setting now (when aligning).  */
+#define rPOS16	r7	/* constant +16.  */
+#define rPOS32	r8	/* constant +32.  */
+#define rPOS48	r9	/* constant +48.  */
+#define rGOT	r9	/* Address of the Global Offset Table.  */
+#define rCLS	r9	/* Cache line size obtained from static.  */
+#define rCTR2	r7
+#define rCTR1	r11
+#define rTMP1	r12
+#define vCHR	v14	/* char to set in each byte.  */
+#define vTMP1	v15
+#define vTMP2	v16
+
+#include <sysdep.h>
+
+	.section ".toc", "aw"
+.LC0:
+	.tc __cache_line_size[TC], __cache_line_size
+	.section ".text"
+	.align 2
+
+/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
+   Returns 's'.  */
+
+EALIGN (memset, 5, 0)
+	CALL_MCOUNT 3
+L(_memset):
+	cmpldi	cr1, rLEN, 8
+	cmpldi	cr5, rLEN, 32
+	mr	rMEMP, rMEMP0
+	ble	cr1, L(small)
+	rlwimi	rCHR, rCHR, 8, 16, 23
+	rlwimi	rCHR, rCHR, 16, 0, 15
+	blt	cr5, L(medium)
+	neg	rTMP, rMEMP
+	andi.	rTMP, rTMP, 15
+	bne	L(nalign16)
+L(align16):
+	cmpldi	7, rLEN, 63
+	rlwinm.	rTMP1, rCHR, 28, 28, 3
+	li	rPOS16, 16
+	ble	7, L(copy_remaining)
+	beq	L(check_cache_line_size)
+L(vec_nz):
+	srwi	rCTR1, rLEN, 6		/* No of 64 byte copy count.  */
+	rlwinm	rLEN, rLEN, 0, 26, 31	/* remaining bytes.  */
+	vxor	vCHR, vCHR, vCHR
+	mtctr	rCTR1			/* move count.  */
+	lvsl	vCHR, 0, rTMP1		/* LSU Move upper nibble
+					   to byte 0 of VR.  */
+	vspltisb	vTMP1, 4	/* VPU Splat 0x4 to every byte.  */
+	lvsl	vTMP2, 0, rCHR		/* LSU Move lower nibble
+					   to byte 0 of VR.  */
+	vslb	vCHR, vCHR, vTMP1	/* VIU Move upper nibble to VR[0:3].  */
+	vor	vCHR, vCHR, vTMP2	/* VIU Form FILL byte in VR[0:7].  */
+	vspltb	vCHR, vCHR, 0		/* VPU Splat the fill
+					   byte to all bytes.  */
+	li	rPOS32, 32
+	li	rPOS48, 48
+L(vnz_loop):
+	stvx	vCHR, 0, rMEMP
+	stvx	vCHR, rPOS16, rMEMP
+	stvx	vCHR, rPOS32, rMEMP
+	stvx	vCHR, rPOS48, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vnz_loop)
+L(copy_remaining):
+	srwi.	rCTR1, rLEN, 3		/* No of 8 byte copy count.  */
+	rlwinm	rLEN, rLEN, 0, 29, 31	/* remaining bytes.  */
+	cmpldi	cr1, rLEN, 1
+	bne	0, L(copy_words)
+L(copy_bytes):
+	bltlr	cr1
+	cmpldi	cr0, rLEN, 4
+	beq	cr1, 2f			/* nb <= 1? (0, 1 bytes).  */
+	bgt	cr0, 1f			/* nb > 4?  (5, 6, 7 bytes).  */
+	addi	rTMP, rLEN, -2		/* 2, 3, 4 bytes.  */
+	sth	rCHR, 0(rMEMP)
+	sthx	rCHR, rMEMP, rTMP
+	blr
+1:
+	addi	rTMP, rLEN, -4		/* 5, 6, 7 bytes.  */
+	stw	rCHR, 0(rMEMP)
+	stwx	rCHR, rMEMP, rTMP
+	blr
+2:	stb	rCHR, 0(rMEMP)
+	blr
+
+L(copy_words):
+	mtcrf	0x01, rCTR1
+	insrdi	rCHR, rCHR, 32, 0	/* Replicate word to double word.  */
+	bf	cr7*4+1, 16f
+	std	rCHR, 0(rMEMP)
+	std	rCHR, 8(rMEMP)
+	std	rCHR, 16(rMEMP)
+	std	rCHR, 24(rMEMP)
+	addi	rMEMP, rMEMP, 32
+16:
+	bf	cr7*4+2, 8f
+	std	rCHR, 0(rMEMP)
+	std	rCHR, 8(rMEMP)
+	addi	rMEMP, rMEMP, 16
+8:
+	bf	cr7*4+3, L(copy_bytes)
+	std	rCHR, 0(rMEMP)
+	addi	rMEMP, rMEMP, 8
+	b	L(copy_bytes)
+
+	.align 5
+L(check_cache_line_size):
+	ld	rCLS, .LC0@toc(r2)
+	lwz	rCLS, 0(rCLS)
+	cmpldi	5, rCLS, 64
+	neg	rTMP, rMEMP
+	bne	5, L(vec_nz)
+	andi.	rTMP, rTMP, 63
+	bne	L(nalign64)
+L(align64):
+	srwi	rCTR1, rLEN, 6
+	cmpldi	7, rCTR1, 32767
+	rlwinm	rLEN, rLEN, 0, 26, 31
+	mtctr	rCTR1
+	bgt	7, L(vec_zbig)
+L(vz_loop):
+	dcbzl	0, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vz_loop)
+	b	L(copy_remaining)
+
+L(vec_zbig):
+	addi	rCTR2, rCTR1, -32767
+	mtctr	rCTR2
+L(vz_big_loop):
+	dcbzl	0, rMEMP
+	dcbf	0, rMEMP
+	addi	rMEMP, rMEMP, 64
+	bdnz	L(vz_big_loop)
+	li	rCTR1, 32767
+	mtctr	rCTR1
+	b	L(vz_loop)
+
+L(nalign64):
+	vxor	vCHR, vCHR, vCHR
+	subf	rLEN, rTMP, rLEN
+	li	rPOS48, 48
+	li	rPOS32, 32
+	stvx	vCHR, 0, rMEMP
+	stvx	vCHR, rPOS16, rMEMP
+	cmpldi	7, rLEN, 64
+	stvx	vCHR, rPOS32, rMEMP
+	stvx	vCHR, rPOS48, rMEMP
+	add	rMEMP, rMEMP, rTMP
+	blt	7, L(copy_remaining)
+	b	L(align64)
+
+L(nalign16):
+	insrdi	rCHR, rCHR, 32, 0 	/* Replicate word to double word.  */
+	std	rCHR, 0(rMEMP)
+	subf	rLEN, rTMP, rLEN
+	std	rCHR, 8(rMEMP)
+	add	rMEMP, rMEMP, rTMP
+	b	L(align16)
+
+	/* Memset of 8 bytes or less.  Taken from GLIBC default memset.  */
+	.align 5
+L(small):
+	cmpldi	cr6, rLEN, 4
+	cmpldi	cr5, rLEN, 1
+	ble	cr6, L(le4)
+	subi	rLEN, rLEN, 4
+	stb	rCHR, 0(rMEMP)
+	stb	rCHR, 1(rMEMP)
+	stb	rCHR, 2(rMEMP)
+	stb	rCHR, 3(rMEMP)
+	addi	rMEMP, rMEMP, 4
+	cmpldi	cr5, rLEN, 1
+L(le4):
+	cmpldi	cr1, rLEN, 3
+	bltlr	cr5
+	stb	rCHR, 0(rMEMP)
+	beqlr	cr5
+	stb	rCHR, 1(rMEMP)
+	bltlr	cr1
+	stb	rCHR, 2(rMEMP)
+	beqlr	cr1
+	stb	rCHR, 3(rMEMP)
+	blr
+
+	/* Memset of 0-31 bytes.  Taken from GLIBC default memset.  */
+	.align 5
+L(medium):
+	mtcrf	0x01, rLEN
+	insrdi	rCHR, rCHR, 32, 0	/* Replicate word to double word.  */
+	cmpldi	cr1, rLEN, 16
+L(medium_tail2):
+	add	rMEMP, rMEMP, rLEN
+L(medium_tail):
+	bt	31, L(medium_31t)
+	bt	30, L(medium_30t)
+L(medium_30f):
+	bt	29, L(medium_29t)
+L(medium_29f):
+	bge	cr1, L(medium_27t)
+	bflr	28
+	std	rCHR, -8(rMEMP)
+	blr
+L(medium_31t):
+	stbu	rCHR, -1(rMEMP)
+	bf	30, L(medium_30f)
+L(medium_30t):
+	sthu	rCHR, -2(rMEMP)
+	bf	29, L(medium_29f)
+L(medium_29t):
+	stwu	rCHR, -4(rMEMP)
+	blt	cr1, L(medium_27f)
+L(medium_27t):
+	std	rCHR, -8(rMEMP)
+	stdu	rCHR, -16(rMEMP)
+L(medium_27f):
+	bflr	28
+L(medium_28t):
+	std	rCHR, -8(rMEMP)
+	blr
+END_GEN_TB (memset,TB_TOCLESS)
+libc_hidden_builtin_def (memset)
+
+#ifndef	NO_BZERO_IMPL
+/* Copied from bzero.S to prevent the linker from inserting a stub
+   between bzero and memset.  */
+ENTRY (__bzero)
+	mr	r5, r4
+	li	r4, 0
+	b	L(_memset)
+END_GEN_TB (__bzero,TB_TOCLESS)
+
+weak_alias (__bzero, bzero)
+#endif
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/bzero.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/bzero.c
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/bzero.c	2015-08-29 15:45:05.867419683 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/bzero.c	2015-08-29 16:00:45.024478649 -0500
@@ -23,6 +23,7 @@ 
 # include "init-arch.h"
 
 extern __typeof (bzero) __bzero_ppc attribute_hidden;
+extern __typeof (bzero) __bzero_e6500 attribute_hidden;
 extern __typeof (bzero) __bzero_power4 attribute_hidden;
 extern __typeof (bzero) __bzero_power6 attribute_hidden;
 extern __typeof (bzero) __bzero_power7 attribute_hidden;
@@ -33,7 +34,10 @@ 
 	      (hwcap & PPC_FEATURE_ARCH_2_05)
 		? __bzero_power6 :
 		  (hwcap & PPC_FEATURE_POWER4)
-		? __bzero_power4
+		? __bzero_power4 :
+		  (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+		  && (hwcap2 & PPC_FEATURE2_HAS_ISEL))
+		? __bzero_e6500
             : __bzero_ppc);
 
 weak_alias (__bzero, bzero)
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/bzero-e6500.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/bzero-e6500.S
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/bzero-e6500.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/bzero-e6500.S	2015-08-29 16:00:45.024478649 -0500
@@ -0,0 +1,26 @@ 
+/* Optimized bzero implementation for PowerPC64/e6500.
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+ENTRY (__bzero_e6500)
+	CALL_MCOUNT 3
+	mr	r5,r4
+	li	r4,0
+	b	__memset_e6500
+END_GEN_TB (__bzero_e6500,TB_TOCLESS)
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c	2015-08-29 15:45:37.045421842 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c	2015-08-29 16:00:45.024478649 -0500
@@ -80,6 +80,10 @@ 
 			      __memset_power6)
 	      IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_POWER4,
 			      __memset_power4)
+	      IFUNC_IMPL_ADD (array, i, memset,
+			      (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+			      && (hwcap2 & PPC_FEATURE2_HAS_ISEL)),
+			      __memset_e6500)
 	      IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ppc))
 
   /* Support sysdeps/powerpc/powerpc64/multiarch/strcpy.c.  */
@@ -149,6 +153,10 @@ 
 			      __bzero_power6)
 	      IFUNC_IMPL_ADD (array, i, bzero, hwcap & PPC_FEATURE_POWER4,
 			      __bzero_power4)
+	      IFUNC_IMPL_ADD (array, i, bzero,
+			      (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+			      && (hwcap2 & PPC_FEATURE2_HAS_ISEL)),
+			      __bzero_e6500)
 	      IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ppc))
 
   /* Support sysdeps/powerpc/powerpc64/multiarch/bcopy.c.  */
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/Makefile glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/Makefile
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/Makefile	2015-08-29 15:47:51.985430863 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/Makefile	2015-08-29 16:12:43.814523563 -0500
@@ -1,9 +1,9 @@ 
 ifeq ($(subdir),string)
 sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
 		   memcpy-power4 memcpy-e6500 memcpy-ppc64 memcmp-power7 \
-		   memcmp-power4 memcmp-e6500 memcmp-ppc64 \
-		   memset-power7 memset-power6 memset-power4 \
-		   memset-ppc64 bzero-power4 bzero-power6 bzero-power7 \
+		   memcmp-power4 memcmp-e6500 memcmp-ppc64 memset-power7 \
+		   memset-power6 memset-power4 memset-e6500 memset-ppc64 \
+		   bzero-power4 bzero-power6 bzero-power7 bzero-e6500 \
 		   mempcpy-power7 mempcpy-ppc64 memchr-power7 memchr-ppc64 \
 		   memrchr-power7 memrchr-ppc64 rawmemchr-power7 \
 		   rawmemchr-ppc64 strlen-power7 strlen-ppc64 strnlen-power7 \
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/memset.c glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/memset.c
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/memset.c	2015-08-29 15:45:05.866419683 -0500
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/memset.c	2015-08-29 16:00:45.025478633 -0500
@@ -29,6 +29,7 @@ 
 extern __typeof (__redirect_memset) __libc_memset;
 
 extern __typeof (__redirect_memset) __memset_ppc attribute_hidden;
+extern __typeof (__redirect_memset) __memset_e6500 attribute_hidden;
 extern __typeof (__redirect_memset) __memset_power4 attribute_hidden;
 extern __typeof (__redirect_memset) __memset_power6 attribute_hidden;
 extern __typeof (__redirect_memset) __memset_power7 attribute_hidden;
@@ -41,7 +42,10 @@ 
 	      (hwcap & PPC_FEATURE_ARCH_2_05)
 		? __memset_power6 :
 		  (hwcap & PPC_FEATURE_POWER4)
-		? __memset_power4
+		? __memset_power4 :
+		  (((hwcap & PPC_FEATURE_E6500) == PPC_FEATURE_E6500)
+		  && (hwcap2 & PPC_FEATURE2_HAS_ISEL))
+		? __memset_e6500
             : __memset_ppc);
 
 #undef memset
diff -Naur glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/memset-e6500.S glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/memset-e6500.S
--- glibc-2.20/sysdeps/powerpc/powerpc64/multiarch/memset-e6500.S	1969-12-31 18:00:00.000000000 -0600
+++ glibc-2.20-e6500-mset/sysdeps/powerpc/powerpc64/multiarch/memset-e6500.S	2015-08-29 16:00:45.025478633 -0500
@@ -0,0 +1,41 @@ 
+/* Optimized memset implementation for PowerPC64/e6500.
+   Copyright (C) 2015 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+#undef EALIGN
+#define EALIGN(name, alignt, words)				\
+  .section ".text";						\
+  ENTRY_2(__memset_e6500)					\
+  .align ALIGNARG(alignt);					\
+  EALIGN_W_##words;						\
+  BODY_LABEL(__memset_e6500):					\
+  cfi_startproc;						\
+  LOCALENTRY(__memset_e6500)
+
+#undef END_GEN_TB
+#define END_GEN_TB(name, mask)					\
+  cfi_endproc;							\
+  TRACEBACK_MASK(__memset_e6500,mask)				\
+  END_2(__memset_e6500)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+
+#define NO_BZERO_IMPL
+#include <sysdeps/powerpc/powerpc64/e6500/memset.S>