Subject: Re: CVS commit: src/lib/libc/arch/i386/string
To: Perry E. Metzger <perry@piermont.com>
From: J.T. Conklin <jtc@acorntoolworks.com>
List: current-users
Date: 02/04/2005 06:50:55
"Perry E. Metzger" <perry@piermont.com> writes:
> Matthias Drochner <M.Drochner@fz-juelich.de> writes:
>> And, originally there was the intention to use the same code
>> in libc and libkern. It already went out of sync at some places,
>> we we probably should just give up on this.
>
> Note that for many calls, mem* is now being inlined by gcc using its
> built in code (unless you do -fno-builtin etc.)
>
> Or, at least I *think* it is...
I haven't looked at gcc's builtin mem* and str* implementations in a
long time, but it used to inline calls only when it knew enough from
the arguments (pointer alignments, constant lengths, constant 0 fill
for memset(), etc.) that the inline beneficial. In other cases, the
extern function is still called.
That being said, I think -ffreestanding, which is used for kernel
builds, also turns off gcc's builtin inlining.
--jtc
--
J.T. Conklin