> > >>
> > > >> The nice thing about this solution is that we can choose explicitly
> > > >> which optimizations we want. And as you can see the kernel makefile
> > > >> gets simpler ;).
> > > >>
> > > >> Of cour
oper bounds checking on
> > >> __builtin_memcpy(), so we don't lose that.
> > >>
> > >> The nice thing about this solution is that we can choose explicitly
> > >> which optimizations we want. And as you can see the kernel makefile
> &g
>>>> __builtin_memcpy(), so we don't lose that.
>>>>
>>>> The nice thing about this solution is that we can choose explicitly
>>>> which optimizations we want. And as you can see the kernel makefile
>>>> gets simpler ;).
>>>>
itly
> >> which optimizations we want. And as you can see the kernel makefile
> >> gets simpler ;).
> >>
> >> Of course the real reason why I'm looking into this is that clang
> >> makes it really hard to build kernels without -ffreestanding.
> >&g
per bounds checking on
>> __builtin_memcpy(), so we don't lose that.
>>
>> The nice thing about this solution is that we can choose explicitly
>> which optimizations we want. And as you can see the kernel makefile
>> gets simpler ;).
>>
>> Of
On Sat, Dec 24, 2016 at 12:08:35AM +0100, Mark Kettenis wrote:
> We can get those optimizations back by doing:
>
> #define memcpy(d, s, n) __builtin_memcpy((d), (s), (n))
You might still want to put a prototype in, just before the define.
Joerg
e nice thing about this solution is that we can choose explicitly
> > > which optimizations we want. And as you can see the kernel makefile
> > > gets simpler ;).
> > >
> > > Of course the real reason why I'm looking into this is that clang
> > > makes
t gcc still does proper bounds checking on
> > __builtin_memcpy(), so we don't lose that.
> >
> > The nice thing about this solution is that we can choose explicitly
> > which optimizations we want. And as you can see the kernel makefile
> > gets simpler ;).
> >
bout this solution is that we can choose explicitly
> which optimizations we want. And as you can see the kernel makefile
> gets simpler ;).
>
> Of course the real reason why I'm looking into this is that clang
> makes it really hard to build kernels without -ffreestanding.
>
>
looking into this is that clang
makes it really hard to build kernels without -ffreestanding.
The diff below implements this strategy, and enabled the optimizations
for memcpy() and memset(). We can add others if we think there is a
benefit. I've tested the diff on amd64. We may need to put an #undef
10 matches
Mail list logo