[Bug target/89093] [9 Regression] C++ exception handling clobbers d8 VFP register

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 11 09:55:00 GMT 2019


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

--- Comment #39 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #38)
> Isn't the issue also latent on all branches?

It is, but we have been lucky that the RA didn't decide to emit that.
On the trunk (unless something changed in RA since end of January) it
unfortunately results in real issues, so we really can't ship GCC 9 with that.

(In reply to Bernd Edlinger from comment #37)
> If a non-general-regs-only function is called from here,
> it will only preserve d8-d15, and the call-clobbered registers
> d0-d7 would of course be modified.
> But is that a problem at all, if the call-clobbered registers are not
> restored?

I'm afraid I don't understand enough why the floating registers can't be used
in the personality routine and other unwinder routines.  I'd think that even in
the
personality routine itself the d8-d15 registers if they are used will be
saved/restored first, so if that wasn't working, I'd say any use of those
registers in the personality routine and anything it calls are problematic
(and, note, not just C++ personality routine, we have also libgcc/unwind-c.c
with C personality routine (also changed in the patch) and perhaps personality
routines for other languages; I see e.g. libobjc/exception.c or
gcc/ada/raise-gcc.c not patched though, and libphobos/libdruntime/gcc/deh.d),
but perhaps it only cares about the personality routine itself and not on what
it calls.  This needs to be clarified.


More information about the Gcc-bugs mailing list