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

--- Comment #40 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Not that I invented this, but as far as I understand,
normally the interrupted execution context registers are saved on a
register file in memory.  But not on ARM.
On arm only the core registers are saved on a register file,
and the non-core, VFP registers are only saved when needed.
When the unwinder needs to restore a VFP register it is
done in _Unwind_VRS_Pop, and when in phase 1 this function
does save the current VFP register bank and does modify the
live VFP registers. Only when core registers are modified that
operates on the register file.
Therefore only the functions that invoke __gnu_unwind_execute
directly or indirectly must not save & restore any non-core registers
in the prologue and epilogue.
When function that saves & restores the d8-d15 but does clobber
d0-d7, that could cause those registers to be different than what
they would be otherwise.
It is possible that _Unwind_VRS_Pop could restore also call-clobbered
registers d0-d7, but I don't know if those registers would
actually need to be restored to their previous state.

Reply via email to