glibc/sysdeps
Noah Goldstein 5321a217cf 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 11:36:22 -07:00
..
aarch64 elf: Fix runtime linker auditing on aarch64 (BZ #26643) 2022-02-01 14:49:46 -03:00
alpha Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
arc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
arm Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
csky Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
generic csu: Implement and use _dl_early_allocate during static startup 2022-05-17 08:08:52 +02:00
gnu Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
hppa hppa: Remove _dl_skip_args usage (BZ# 29165) 2022-06-10 08:39:05 -03:00
htl htl: Fix build error in annexc 2022-01-17 23:18:27 +00:00
hurd hurd: Fix pthread_kill on exiting/ted thread 2022-01-15 15:11:54 +01:00
i386 i386: Regenerate ulps 2022-04-27 21:17:50 -04:00
ia64 elf: Issue la_symbind for bind-now (BZ #23734) 2022-02-01 14:49:46 -03:00
ieee754 math: Fix float conversion regressions with gcc-12 [BZ #28713] 2022-01-10 14:27:17 +00:00
m68k m68k: Handle fewer relocations for RTLD_BOOTSTRAP (#BZ29071) 2022-04-20 14:54:27 -07:00
mach rtld: Use generic argv adjustment in ld.so [BZ #23293] 2022-05-19 10:48:52 +01:00
microblaze Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mips elf: Add <dl-r_debug.h> 2022-01-31 07:05:48 -08:00
nios2 nios2: Remove _dl_skip_args usage (BZ# 29187) 2022-06-10 08:39:50 -03:00
nptl nptl: Handle spurious EINTR when thread cancellation is disabled (BZ#29029) 2022-04-15 09:44:02 -03:00
or1k or1k: Define PI_STATIC_AND_HIDDEN 2022-02-02 20:05:12 +09:00
posix socket: Use 64 bit stat for isfdtype (BZ# 29209) 2022-06-01 14:18:43 -03:00
powerpc powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197] 2022-06-07 15:29:50 -03:00
pthread nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) 2022-06-08 09:38:56 -03:00
riscv Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
s390 S390: Enable static PIE 2022-05-19 09:46:56 +02:00
sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sparc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
unix linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304) 2022-06-30 09:50:38 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
x86 x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ)) 2022-05-16 10:20:57 -07:00
x86_64 x86: Shrink code size of memchr-avx2.S 2022-07-18 11:36:22 -07:00