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

--- Comment #10 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(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.

> Shouldn't that be something like save-nothing vs save-all-FP-regs if there
> is a callee?
> 
> Do you mean save direct clobbers only when the handler is a leaf function?

Well, obviously if it's a leaf function, saving only the registers that are
clobbered is enough, and the compiler can do the analysis to ensure that.

> 
> > Provide libgcc routines to save/restore the FP context.
> Do you mean such routines should push all FP regs+status regs?

All registers that are are call clobbered.  There's no need to do the
call-saved registers as the compiler can do that on an as-needed case already.

Reply via email to