XFree86 host.def

Matthias Benkmann matthias at winterdrache.de
Thu Oct 3 03:42:27 PDT 2002


On Wed, 2 Oct 2002 16:39:33 -0500 (CDT) dagmar at speakeasy.net wrote:

> According to the info pages for gcc...
> 
>      `-O2' turns on all optional optimizations except for loop
>      unrolling, function inlining, and register renaming.
> 
> I'm pretty sure -fomit-frame-pointer is of that lot.

No, it's not (forget the documentation; it sucks):

long* f(long* p)
{
  int i;
  for (i=0; i<5; ++i) ++p;
  return p;
}

compiled with

gcc -O2 -S temp.c

gives

f:
        pushl   %ebp
        movl    $4, %edx
        movl    %esp, %ebp
        movl    8(%ebp), %eax
.L6:
        addl    $4, %eax
        decl    %edx
        jns     .L6
        popl    %ebp
        ret

but when compiled with

gcc -O2 -fomit-frame-pointer -S temp.c

gives

f:
        movl    4(%esp), %eax
        movl    $4, %edx
.L6:
        addl    $4, %eax
        decl    %edx
        jns     .L6
        ret


Not even -O3 enables -fomit-frame-pointer by default (on x86).

MSB

-- 
He who SHOUTS is always wrong.

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-dev' in the subject header of the message



More information about the blfs-dev mailing list