arm: Add support for interrupt routines to reg_needs_saving_p
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 4 May 2020 13:42:03 +0000 (13:42 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Fri, 15 May 2020 09:57:57 +0000 (09:57 +0000)
commit62af27e77b5b985bd496d9bc9ed35233bd612b04
tree4537cc23cd106c1f31c2b57082edb2550c2f730c
parent9f0f7da9aa98eec28b4e5e34ade0aa0028df161d
arm: Add support for interrupt routines to reg_needs_saving_p

reg_needs_saving_p is only used when dealing with non-interrupt
routines, but it makes sense to extend it to support that context too,
and make arm_compute_save_reg0_reg12_mask use it.

Save only live registers for non-leaf functions, but assume a callee
could clobber any register.

2020-05-15  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm.c (reg_needs_saving_p): Add support for interrupt
routines.
(arm_compute_save_reg0_reg12_mask): Use reg_needs_saving_p.
gcc/ChangeLog
gcc/config/arm/arm.c