Re: sched.c -fno-omit-frame-pointer

From: Alan Modra (alan@linuxcare.com.au)
Date: Tue May 09 2000 - 03:52:01 EDT

  • Next message: Steffen Grunewald: "Sony memory stick adapters"

    On Tue, 9 May 2000, Tigran Aivazian wrote:

    > On Tue, 9 May 2000, Alan Modra wrote:
    >
    > > On Tue, 9 May 2000, Keith Owens wrote:
    > >
    > > > Why does kernel/Makefile set -fno-omit-frame-pointer for sched.c.
    > > > AFAICT there are no comments in the code or the Makefile about this.
    > >
    > > Because switch_to in include/asm-i386/system.h breaks rather badly
    > > otherwise.
    >
    > why not put this explanation in the Makefile next to it and send to Linus,
    > please?

    Because it's wrong :-( I should have checked exactly what gcc does before
    firing off that email.

    gcc can generate code that accesses parameters like prev->tss.esp
    indexed from registers other than %esp, since switch_to is passed
    prev, next, and last in registers. If this were not so, gcc might
    access task_struct fields via %esp in the asm, which breaks as %esp is
    altered by the pushes.

    Hmm, actually I don't think there's anything to prohibit gcc from using
    %esp anyway. Maybe I should rewrite switch_to to make sure of this.

    Regards, Alan Modra

    -- 
    Linuxcare.  Support for the Revolution.
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Tue May 09 2000 - 03:56:31 EDT