rl78.c (rl78_expand_prologue): Save the MDUC related registers in all interrupt handl...
authorKaushik Phatak <kaushik.phatak@kpit.com>
Mon, 9 May 2016 11:44:58 +0000 (11:44 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Mon, 9 May 2016 11:44:58 +0000 (11:44 +0000)
commit035b8879acaccdbf52d24730fe241e97d660d53d
tree4a83a2d6833b91c14aa8edc0efbc99d40e6145af
parent18caa34eb299b8ea583088ce4bbf32cdc37676ff
rl78.c (rl78_expand_prologue): Save the MDUC related registers in all interrupt handlers if necessary.

* config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related
registers in all interrupt handlers if necessary.
(rl78_option_override): Add warning.
(MUST_SAVE_MDUC_REGISTERS): New macro.
(rl78_expand_epilogue): Restore the MDUC registers if necessary.
* config/rl78/rl78.c (check_mduc_usage): New function.
(mduc_regs): New structure to hold MDUC register data.
* config/rl78/rl78.md (is_g13_muldiv_insn): New attribute.
(mulsi3_g13): Add is_g13_muldiv_insn attribute.
(udivmodsi4_g13): Add is_g13_muldiv_insn attribute.
(mulhi3_g13): Add is_g13_muldiv_insn attribute.
* config/rl78/rl78.opt (msave-mduc-in-interrupts): New option.
* doc/invoke.texi (RL78 Options): Add -msave-mduc-in-interrupts.

From-SVN: r236027
gcc/ChangeLog
gcc/config/rl78/rl78.c
gcc/config/rl78/rl78.md
gcc/config/rl78/rl78.opt
gcc/doc/invoke.texi