MSP430: Don't save all callee-saved regs in non-leaf interrupt functions
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Mon, 22 Jul 2019 16:02:29 +0000 (16:02 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Mon, 22 Jul 2019 16:02:29 +0000 (16:02 +0000)
commit310b5fb79316511295c04f956f4c6630437ba204
tree438824e69ea2cf12dd9304e85b0b541fa9587a61
parent9afb91b2d1aeabf49a2b76556ec6fe18dd5790f9
MSP430: Don't save all callee-saved regs in non-leaf interrupt functions

Previously, all callee-saved regs would unconditionally be saved
in interrupt functions that call another function.

2019-07-22  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.c (msp430_preserve_reg_p): Don't save
callee-saved regs R4->R10 in an interrupt function that calls another
function.

2019-07-22  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* gcc.target/msp430/isr-push-pop-main.c: New test.
* gcc.target/msp430/isr-push-pop-isr-430.c: Likewise.
* gcc.target/msp430/isr-push-pop-isr-430x.c: Likewise.
* gcc.target/msp430/isr-push-pop-leaf-isr-430.c: Likewise.
* gcc.target/msp430/isr-push-pop-leaf-isr-430x.c: Likewise.

From-SVN: r273702
gcc/ChangeLog
gcc/config/msp430/msp430.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/msp430/isr-push-pop-isr-430.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/isr-push-pop-isr-430x.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/isr-push-pop-leaf-isr-430.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/isr-push-pop-leaf-isr-430x.c [new file with mode: 0644]
gcc/testsuite/gcc.target/msp430/isr-push-pop-main.c [new file with mode: 0644]