On 22/04/19 11:14 +0200, Jakub Jelinek wrote:
Hi!

As detailed in the PR, unlike most other targets, on ARM EABI the floating
point registers are saved lazily, when EH personality routine calls
__gnu_unwind_frame (usually in the CONTINUE_UNWINDING macro).
That means the unwinder itself and the personality routines (and whatever
other functions those call in the path to CONTINUE_UNWINDING) must be
compiled so that it doesn't use floating point registers.  Calling some
function that saves those on entry and restores on exit is fine, but calling
some function which saves those on entry and then calls __gnu_unwind_frame
and then restores on exit is not fine.
In 8.x and earlier we were just lucky that the RA when compiling those
didn't decide to use any of those registers, but starting with the combiner
hard register changes we are no longer so lucky.

The following patch introduces -mgeneral-regs-only option and
general-regs-only target attribute for ARM (similarly to how other targets
like AArch64 and x86), changes the ARM unwinder to be compiled with that
and changes the personality routines of all languages so that either just
the personality routine, or whatever other routines called by personality
routines that call directly or indirectly __gnu_unwind_frame to be compiled
that way.

Bootstrapped/regtested on armv7hl-linux-gnueabi (and x86_64-linux to make
sure it compiles on other targets too).

Ok for trunk?

The libsupc++ part is OK.


Reply via email to