inlining callbacks question

Christopher Layne clayne@anodized.com
Mon Feb 12 07:57:00 GMT 2007


On Sun, Feb 11, 2007 at 03:56:39PM +0000, Andrew Haley wrote:
> With your unaltered source code, I get this at -O3:
> 
> main:
> .LFB28:
>         subl    $1, %edi
>         pushq   %rbx
> .LCFI1:
>         movl    $1, %eax
>         movq    %rsi, %rbx
>         jle     .L8
>         movl    $16, %edi
>         call    malloc
>         movq    8(%rbx), %rdx
>         movq    stdout(%rip), %rdi
>         movl    $.LC0, %esi
>         movq    $cbt_display, 8(%rax)
>         movq    %rdx, (%rax)
>         xorl    %eax, %eax
>         call    fprintf
>         xorl    %eax, %eax
> .L8:
>         popq    %rbx
>         ret

gcc 4.1.1. However, did you specify -DCB to gcc? Otherwise it's going to use
the direct call. :)

-cl



More information about the Gcc-help mailing list