/
CT_00_038 - mem* and str* -- inline expansion in GLIBC implementation
CT_00_038 - mem* and str* -- inline expansion in GLIBC implementation
About
Glibc provides generic versions of all the relevant routines and needs both scalar and vector implementations with automatic selection via ifuncs.
- VRULL has reasonable scalar implementations of several functions
- Rivos and SiFive have reasonable vector implementations of several functions as well
- There is a general agreement that dynamic ifunc selection for RISC-V can be integrated after the glibc-2.39 release (due the first week of Feb). So in the near these routines should be integrated into glibc with dynamic selection
Stakeholders/Partners
RISE:
Ventana: Jeff & Robin
Rivos: Palmer & Sergei
External:
VRULL: Christoph Muller
EMBECOSM: Joern Rennecke
Dependencies
Status
Updates
- Vectorized memset accepted by glibc project, pending one trivial fix.
- Should be able to stamp out the rest trivially now
- Ventana has changes which wire up the vector str*/mem* routines from SiFive & Rivos as well as scalar versions of VRULL into ifunc/hwprobe framework
- Tested on BPI & QEMU to verify we get into the appropriate routine based on the result of the hwprobe query
- Did expose minor bugs in the VRULL scalar implementations which have since been fixed
- Upstream doesn't want the str* scalar implementations in their current form
- Rather than full raw assembly routines, use C versions with the magic twiddles to enable using orc.b and such
- Not currently planning to implement this (focused on vector), but someone else certainly could
- GLIBC effort broken out into a distinct 2H2024 work item
, multiple selections available,
Related content
CT_00_012 - mem* and str* -- inline expansion in GCC
CT_00_012 - mem* and str* -- inline expansion in GCC
More like this
CT_00_039 - Extension Elimination (GCC)
CT_00_039 - Extension Elimination (GCC)
More like this
CT_00_041 - Saturating Arithmetic (GCC)
CT_00_041 - Saturating Arithmetic (GCC)
Read with this
CT_00_001 - Autovectorization -- Basic Functionality (GCC)
CT_00_001 - Autovectorization -- Basic Functionality (GCC)
More like this
CT_00_013 - Autovectorization -- Improvements (GCC)
CT_00_013 - Autovectorization -- Improvements (GCC)
More like this
CT_00_037 -- Zicond with if-conversion improvements (GCC)
CT_00_037 -- Zicond with if-conversion improvements (GCC)
Read with this