|
Message-ID: <20210828094847.GB3090@voyager> Date: Sat, 28 Aug 2021 11:48:47 +0200 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Subject: Re: Why the musl libc did not support neon simd acceleartor officially on mem* operations? On Sat, Aug 28, 2021 at 04:01:40PM +0800, tugouxp wrote: > HI guys: > I found that the current implmention of musl arm port memcpy.S and > other mem*.S operations did not use arm neon instructions, this > seems differenct with other counterparts like newlibc, glibc and > bonic libc, which all impl. the neon version of mem* operations. I am not an expert on this or indeed anything, but it seems like there are two plausible explanations for this: 1.) Neon support is not architectural, and not subarchitectural. It appears Neon comes with a new register set the kernel has to switch out on context switch, so Neon support is predicated on kernel support. That makes it a runtime thing. Leaving aside where the kernel declares such support, having a runtime switch in memcpy() is going to be a slowdown of some kind for all existing users. I don't know how much of a slowdown, but a slowdown nonetheless. My guess is the other libcs ignore the issue of the user compiling a userspace that won't run on the target platform and allow the user to shoot themselves in the foot. Adverting to the competition is a poor choice for this mailing list, by the way, because part of musl's success comes from looking at them and saying: No, we are not going to do that. 2.) The code does not exist because it has not been written yet. You are welcome to submit a patch. I mean, you found the mailing list easily enough. > so could you tell me why? is there and concern about on this in musl? > if i want to imple my self imple. how to do this, is there any matual > pathches to use? None that I am aware of, so they have not been submitted to this list for sure. 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.