https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94743

--- Comment #12 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Christophe Lyon from comment #11)
> (In reply to Richard Earnshaw from comment #10)
> > (In reply to Christophe Lyon from comment #9)
> > > > My initial thoughts are along the lines of...
> > > > Only try to save FP registers that this function directly clobbers.
> > > What's the point of saving these if a callee clobbers other registers?
> > > 
> > 
> > They need to be done early enough to ensure that any code in *this* function
> > does not clobber them.  Any additional registers would have to be saved by a
> > library call that does that.
> > 
> Why do we need a library function for that? It would have to be special with
> the stack: push FP registers, but do not restore SP, so that the dual
> restore function can pop them and restore SP.

Because it's a lot of code to work out how many FP registers there are.  You
can't assume that the FPU used to compile the interrupt handler is the same as
that being used at run time.

Reply via email to