Re: [PATCH v-1] x86_64: new and improved memset() + question

2019-02-11 Thread Alexey Dobriyan
On Mon, Feb 11, 2019 at 01:47:16PM +0100, Ingo Molnar wrote: > * Alexey Dobriyan wrote: > > QUESTION: is it possible to tell gcc "this function is semantically > > equivalent to memset(3) so make high level optimizations but call it > > when it is necessary"? I suspect the answer is "no" :-\ > >

Re: [PATCH v-1] x86_64: new and improved memset() + question

2019-02-11 Thread Ingo Molnar
* Alexey Dobriyan wrote: > Current memset() implementation does silly things: > * multiplication to get wide constant: > waste of cycles if filler is known at compile time, > > * REP STOSQ followed by REP STOSB: > this code is used when REP STOSB is slow but still it is used >