glibc/sysdeps
Noah Goldstein a910d7e164 x86: Shrink code size of memchr-avx2.S
This is not meant as a performance optimization. The previous code was
far to liberal in aligning targets and wasted code size unnecissarily.

The total code size saving is: 59 bytes

There are no major changes in the benchmarks.
Geometric Mean of all benchmarks New / Old: 0.967

Full xcheck passes on x86_64.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

(cherry picked from commit 6dcbb7d95d)

x86: Fix page cross case in rawmemchr-avx2 [BZ #29234]

commit 6dcbb7d95d
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date:   Mon Jun 6 21:11:33 2022 -0700

    x86: Shrink code size of memchr-avx2.S

Changed how the page cross case aligned string (rdi) in
rawmemchr. This was incompatible with how
`L(cross_page_continue)` expected the pointer to be aligned and
would cause rawmemchr to read data start started before the
beginning of the string. What it would read was in valid memory
but could count CHAR matches resulting in an incorrect return
value.

This commit fixes that issue by essentially reverting the changes to
the L(page_cross) case as they didn't really matter.

Test cases added and all pass with the new code (and where confirmed
to fail with the old code).
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

(cherry picked from commit 2c9af8421d)
2022-07-18 20:45:21 -07:00
..
aarch64
alpha
arc
arm
csky
generic csu: Implement and use _dl_early_allocate during static startup 2022-05-19 12:13:53 +02:00
gnu
hppa hppa: Remove _dl_skip_args usage (BZ# 29165) 2022-06-10 09:13:54 -03:00
htl
hurd
i386
ia64
ieee754
m68k
mach rtld: Use generic argv adjustment in ld.so [BZ #23293] 2022-05-19 16:48:47 +01:00
microblaze
mips
nios2 nios2: Remove _dl_skip_args usage (BZ# 29187) 2022-06-10 09:15:00 -03:00
nptl
posix socket: Use 64 bit stat for isfdtype (BZ# 29209) 2022-06-01 13:34:51 -03:00
powerpc powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197] 2022-06-07 15:34:20 -03:00
pthread nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) 2022-06-08 17:15:08 -03:00
riscv
s390 S390: Enable static PIE 2022-05-19 17:15:57 +02:00
sh
sparc
unix linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304) 2022-06-30 10:46:39 -03:00
wordsize-32
wordsize-64
x86
x86_64 x86: Shrink code size of memchr-avx2.S 2022-07-18 20:45:21 -07:00