lkml.org 
[lkml]   [1997]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pre-patch-2.1.37-3 comment / compile fixes
Our fearless leader wrote:
> 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

Um, Linus, you're getting __label__ declarations mixed up with *asm* local
labels like the asm("1:") ones in

extern inline char * strcpy(char * dest,const char *src)
{
__asm__ __volatile__(
"cld\n"
"1:\tlodsb\n\t"
"stosb\n\t"
"testb %%al,%%al\n\t"
"jne 1b"
: /* no output */
:"S" (src),"D" (dest):"si","di","ax","memory");
return dest;
}

The GCC code generator never sees those, so it can't possibly use them
as an excuse to generate a stack frame.
--
-Colin

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.025 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site