![]() |
|
Message-ID: <aNYKh708fxqxrjGI@voyager> Date: Fri, 26 Sep 2025 05:37:43 +0200 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Cc: Yao Zi <ziyao@...root.org> Subject: Re: [PATCH 1/1] riscv64: optimize memset implementation with vector extension Am Fri, Sep 26, 2025 at 08:31:53AM +0800 schrieb Pincheng Wang: > I am investigating a runtime detection and dispatch mechanism to select the > appropriate implementation based on actual hardware support. If I make > progress on this and verify it works as expected, I will update the approach > in a v2 patch. > There seems to be a hwcap flag for ISA_V that might be usable. Not sure if it is any help for memcpy() though, because memcpy() is a function GCC can insert calls to at any point, including the dynamic linker stages 1 and 2, and references to libc.hwcap are invalid there. The only solution I see is to explicitly switch to the optimized version after it is possible to do so and use the generic version for starters. But that would be a bit of a larger change to the code base. Ciao, Markus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.