Re: pre-patch-2.1.37-3 comment / compile fixes

Linus Torvalds (torvalds@transmeta.com)
4 May 1997 16:41:05 GMT


In article <199705032258.AAA28920@informatik.uni-koblenz.de>,
Systemkennung Linux <linux@mailhost.uni-koblenz.de> wrote:
>Martin is right. The bug is produced by GCC inlining
>csum_partial_copy_generic() into csum_partial_copy() AND keeping one
>outlined copy of csum_partial_copy_generic() for the other callers
>in include/asm-i386/checksum.h. Fix is to use local labels only in
>all inline assembler.

Note to performance people: I used to think that using local labels was
a great idea, but I'm not all that certain any more. The problem is
that gcc seems to implement local labels through a similar mechanism as
local functions, which in turn means that any function that has a local
label will aqcuire a stack frame. No, don't ask me why, but that is
what seems to happen.

End result: avoid local labels if you really care about that last bit of
performance

Linus