lkml.org 
[lkml]   [2009]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: BUG: GCC-4.4.x changes the function frame on some functions
    On 11/19/2009 11:28 AM, Steven Rostedt wrote:
    >
    > Hehe, scratch register on i686 ;-)
    >
    > i686 has no extra regs. It just has:
    >
    > %eax, %ebx, %ecx, %edx - as the general purpose regs
    > %esp - stack
    > %ebp - frame pointer
    > %edi, %esi - counter regs
    >
    > That's just 8 regs, and half of those are special.
    >

    For a modern ABI it is better described as:

    %eax, %edx, %ecx - argument/return/scratch registers
    %ebx, %esi, %edi - saved registers
    %esp - stack pointer
    %ebp - frame pointer (saved)

    > Perhaps we could create another profiler? Instead of calling mcount,
    > call a new function: __fentry__ or something. Have it activated with
    > another switch. This could make the performance of the function tracer
    > even better without all these exceptions.
    >
    > <function>:
    > call __fentry__
    > [...]
    >

    Calling the profiler immediately at the entry point is clearly the more
    sane option. It means the ABI is well-defined, stable, and independent
    of what the actual function contents are. It means that ABI isn't the
    normal C ABI (the __fentry__ function would have to preserve all
    registers), but that's fine...

    -hpa

    --
    H. Peter Anvin, Intel Open Source Technology Center
    I work for Intel. I don't speak on their behalf.



    \
     
     \ /
      Last update: 2009-11-19 20:59    [W:4.089 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site