Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Haley <aph@redhat.com>, Andreas Tobler <toa@pop.agri.ch>,
	Geoffrey Keating <geoffk@apple.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Andrew Pinski <pinskia@physics.uc.edu>,
	Eric Christopher <echristo@redhat.com>,
	Richard Henderson <rth@redhat.com>,
	linux-mips@linux-mips.org
Subject: Re: [RFC]: MD_FALLBACK_FRAME_STATE_FOR macro for darwin PPC
Date: Wed, 21 Jan 2004 12:08:04 -0800	[thread overview]
Message-ID: <400EDC24.3080309@avtrex.com> (raw)
In-Reply-To: <16398.55568.933882.591110@cuddles.cambridge.redhat.com>

Andrew Haley wrote:

>David Daney writes:
> > Andreas Tobler wrote:
> > 
> > > David Daney wrote:
> > >
> > >
> > >> I know next to nothing about PPC ABIs, but are any of these floating 
> > >> point registers?
> > >
> > >
> > > There are, yes.
> > >
> > >> Are there any call saved FP registers in this ABI? and if so are you 
> > >> restoring them.  Although I don't think that the unwinder uses 
> > >> floating point, it seems that restoring call saved FP registers is a 
> > >> good idea if you are not already doing it.
> > >
> > >
> > > Well, here I expect the advise from the experts, I have floats around 
> > > and I may try to restore them.
> > >
> > > But, I need some guidance here.
> > 
> > When I did the MD_FALLBACK_FRAME_STATE_FOR for mips/linux I did not 
> > handle floating point either as the problem did not occur to me until 
> > after I checked in the code.
> > 
> > However after thinking about it and posting:
> > 
> > http://gcc.gnu.org/ml/gcc/2003-10/msg00972.html
> > 
> > I learned that this is a real issue.
> > 
> > I may be about ready to do some more mips/linux work soon and may 
> > revisit MD_FALLBACK_FRAME_STATE_FOR.  Because in its current state it 
> > seems to be incomplete.
>
>You only need to restore what has been saved.  Looking at
>/usr/src/linux-2.4/arch/mips/kernel/signal.c, it seems that there is a
>call to save_fp_context().  However, this is only executed if
>(current->used_math) is set; you mustn't restore any fp registers if
>the process hasn't saved the fp state.
>
>There is a field called sc_used_math in the sigcontext struct.  I
>think this tells you what you need to know.  But I am not a kernel
>hacker...
>
>Andrew.
>  
>
Ralf,

Is this all true?

Perhaps you could shed some light on what really needs to be done in the 
MIPS/linux case.

Also what should be done in the case of mips 4Kc core where there is 
only software floating point?

David Daney.

       reply	other threads:[~2004-01-21 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <400D9173.7010508@pop.agri.ch>
     [not found] ` <7809AEC4-4B8A-11D8-83EB-000A95B1F520@apple.com>
     [not found]   ` <400E3C5C.3060001@pop.agri.ch>
     [not found]     ` <400EC5B4.6020402@avtrex.com>
     [not found]       ` <400ED0D9.20704@pop.agri.ch>
     [not found]         ` <400ED4DE.6080601@avtrex.com>
     [not found]           ` <16398.55568.933882.591110@cuddles.cambridge.redhat.com>
2004-01-21 20:08             ` David Daney [this message]
2004-01-21 22:26               ` [RFC]: MD_FALLBACK_FRAME_STATE_FOR macro for darwin PPC Jun Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=400EDC24.3080309@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=aph@redhat.com \
    --cc=echristo@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=geoffk@apple.com \
    --cc=linux-mips@linux-mips.org \
    --cc=pinskia@physics.uc.edu \
    --cc=ralf@linux-mips.org \
    --cc=rth@redhat.com \
    --cc=toa@pop.agri.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox