glibc/sysdeps
Yao Zihong 0698fd462a riscv: memcpy_noalignment: Fold SZREG/BLOCK_SIZE alignment to single andi
Simplify the alignment steps for SZREG and BLOCK_SIZE multiples. The previous
three-instruction sequences

    addi    a7, a2, -SZREG
    andi    a7, a7, -SZREG
    addi    a7, a7, SZREG

and

    addi    a7, a2, -BLOCK_SIZE
    andi    a7, a7, -BLOCK_SIZE
    addi    a7, a7, BLOCK_SIZE

are equivalent to a single

    andi    a7, a2, -SZREG
    andi    a7, a2, -BLOCK_SIZE

because SZREG and BLOCK_SIZE are powers of two in this context, making the
surrounding addi steps cancel out. Folding to one instruction reduces code
size with identical semantics.

No functional change.

sysdeps/riscv/multiarch/memcpy_noalignment.S: Remove redundant addi around
alignment; keep a single andi for SZREG/BLOCK_SIZE rounding.

Signed-off-by: Yao Zihong <zihong.plct@isrc.iscas.ac.cn>
Reviewed-by: Peter Bergner <bergner@tenstorrent.com>
2025-10-30 17:47:24 -05:00
..
aarch64 aarch64: Fix tst-ifunc-arg-4 on clang-18 2025-10-29 12:54:10 -03:00
alpha alpha: Fix missing inexact-flag raising for lround/lrint 2025-09-11 14:48:00 -03:00
arc math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
arm arm: Add ARM VFPv4 VFMA instruction support in fma/fmaf (BZ 15503) 2025-10-03 15:19:54 -03:00
csky math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
generic math: Add builtin support for (l)lround(f) 2025-10-17 17:03:54 +00:00
gnu Updates struct tcp_zerocopy_receive from 5.11 to netinet/tcp.h. 2025-10-29 12:54:12 -03:00
hppa math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
htl
hurd
i386 i386: Remove the SVID error handling from fmodf 2025-10-30 15:41:07 -03:00
ieee754 math: Remove the SVID error handling wrapper from yn/jn 2025-10-30 15:41:35 -03:00
loongarch math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
m68k math: Remove the SVID error handling from coshf 2025-10-30 15:41:28 -03:00
mach math: Remove the SVID error handling wrapper from yn/jn 2025-10-30 15:41:35 -03:00
microblaze
mips mips: Fix delay slot filling in bsd-setjmp.S 2025-09-23 10:29:24 -03:00
nptl
or1k math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
posix assert: Refactor assert/assert_perror 2025-09-23 10:29:24 -03:00
powerpc ppc64le: Power 10 rawmemchr clobbers v20 (bug #33091) 2025-10-26 12:19:53 -05:00
pthread Add once_flag, ONCE_FLAG_INIT and call_once to stdlib.h for C23 2025-10-01 15:15:15 +00:00
riscv riscv: memcpy_noalignment: Fold SZREG/BLOCK_SIZE alignment to single andi 2025-10-30 17:47:24 -05:00
s390 math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
sh math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
sparc math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
unix math: Remove the SVID error handling wrapper from yn/jn 2025-10-30 15:41:35 -03:00
wordsize-32 Replace count_leading_zeros with stdc_leading_zeros 2025-10-29 12:53:55 -03:00
wordsize-64
x86 Annotate swtich fall-through 2025-10-29 12:54:01 -03:00
x86_64 x86: fix wmemset ifunc stray '!' (bug 33542) 2025-10-29 12:54:14 -03:00