public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add ifunc support and different versions of strlen
@ 2023-08-01  7:09 dengjianbo
  2023-08-01  7:09 ` [PATCH 1/2] LoongArch: Redefine macro LEAF/ENTRY dengjianbo
  2023-08-01  7:09 ` [PATCH 2/2] Loongarch: Add ifunc support and add different versions of strlen dengjianbo
  0 siblings, 2 replies; 16+ messages in thread
From: dengjianbo @ 2023-08-01  7:09 UTC (permalink / raw)
  To: libc-alpha
  Cc: adhemerval.zanella, xry111, caiyinyu, xuchenghua, huangpei, dengjianbo

Tested on LoongArch 3A5000 machine: gcc 13.0.1, Linux kernel 6.1.0-rc7+,
binutils 2.40.50, No new FAIL items introduced.

make check:
4646 PASS
  20 UNSUPPORTED
  12 XFAIL 
   6 XPASS

make bench result can be found from:
https://github.com/jiadengx/glibc_test/blob/main/strlen/bench-strlen.out

Comparing with the current generic version, strlen_lasx(256bit SIMD) has
a 20%-600% performance improvement, strlen_lsx(128bit SIMD) has a 20%-
280% performace improvement, strlen_algin has a 5%-60% performance
improvement when length exceeds 32 bytes.

Detailed info can be found from histogram via following link:
https://github.com/jiadengx/glibc_test/tree/main/strlen

dengjianbo (2):
  LoongArch: Redefine macro LEAF/ENTRY.
  Loongarch:  Add ifunc support and add different versions of strlen

 sysdeps/loongarch/lp64/multiarch/Makefile     |   3 +
 .../lp64/multiarch/ifunc-impl-list.c          |  39 +++++++
 .../loongarch/lp64/multiarch/ifunc-strlen.h   |  36 +++++++
 .../loongarch/lp64/multiarch/strlen-aligned.S | 101 ++++++++++++++++++
 .../loongarch/lp64/multiarch/strlen-lasx.S    |  65 +++++++++++
 sysdeps/loongarch/lp64/multiarch/strlen-lsx.S |  73 +++++++++++++
 sysdeps/loongarch/lp64/multiarch/strlen.c     |  37 +++++++
 sysdeps/loongarch/sys/asm.h                   |  36 +++++--
 sysdeps/loongarch/sys/regdef.h                |  57 ++++++++++
 .../unix/sysv/linux/loongarch/cpu-features.h  |   2 +
 10 files changed, 439 insertions(+), 10 deletions(-)
 create mode 100644 sysdeps/loongarch/lp64/multiarch/Makefile
 create mode 100644 sysdeps/loongarch/lp64/multiarch/ifunc-impl-list.c
 create mode 100644 sysdeps/loongarch/lp64/multiarch/ifunc-strlen.h
 create mode 100644 sysdeps/loongarch/lp64/multiarch/strlen-aligned.S
 create mode 100644 sysdeps/loongarch/lp64/multiarch/strlen-lasx.S
 create mode 100644 sysdeps/loongarch/lp64/multiarch/strlen-lsx.S
 create mode 100644 sysdeps/loongarch/lp64/multiarch/strlen.c

-- 
2.40.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-04 10:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  7:09 [PATCH 0/2] Add ifunc support and different versions of strlen dengjianbo
2023-08-01  7:09 ` [PATCH 1/2] LoongArch: Redefine macro LEAF/ENTRY dengjianbo
2023-08-01  7:09 ` [PATCH 2/2] Loongarch: Add ifunc support and add different versions of strlen dengjianbo
2023-08-01 14:31   ` Adhemerval Zanella Netto
2023-08-02  1:25     ` caiyinyu
2023-08-02 12:25       ` dengjianbo
2023-08-02 12:59         ` Adhemerval Zanella Netto
2023-08-03 13:27           ` dengjianbo
2023-08-03 13:48             ` Adhemerval Zanella Netto
2023-08-03 14:53               ` Xi Ruoyao
2023-08-03 14:59                 ` Xi Ruoyao
2023-08-03 16:29                   ` Adhemerval Zanella Netto
2023-08-04  1:50                 ` caiyinyu
2023-08-04 10:00               ` dengjianbo
2023-08-01 14:44   ` Xi Ruoyao
2023-08-02 12:47     ` dengjianbo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).