From 035b8879acaccdbf52d24730fe241e97d660d53d Mon Sep 17 00:00:00 2001 From: Kaushik Phatak Date: Mon, 9 May 2016 11:44:58 +0000 Subject: 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/doc/invoke.texi | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0554249..908dbe8 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -947,7 +947,7 @@ See RS/6000 and PowerPC Options. @emph{RL78 Options} @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol -mcpu=g10 -mcpu=g13 -mcpu=g14 -mg10 -mg13 -mg14 @gol --m64bit-doubles -m32bit-doubles} +-m64bit-doubles -m32bit-doubles -msave-mduc-in-interrupts} @emph{RS/6000 and PowerPC Options} @gccoptlist{-mcpu=@var{cpu-type} @gol @@ -19783,6 +19783,20 @@ Make the @code{double} data type be 64 bits (@option{-m64bit-doubles}) or 32 bits (@option{-m32bit-doubles}) in size. The default is @option{-m32bit-doubles}. +@item -msave-mduc-in-interrupts +@item -mno-save-mduc-in-interrupts +@opindex msave-mduc-in-interrupts +@opindex mno-save-mduc-in-interrupts +Specifies that interrupt handler functions should preserve the +MDUC registers. This is only necessary if normal code might use +the MDUC registers, for example because it performs multiplication +and division operations. The default is to ignore the MDUC registers +as this makes the interrupt handlers faster. The target option -mg13 +needs to be passed for this to work as this feature is only available +on the G13 target (S2 core). The MDUC registers will only be saved +if the interrupt handler performs a multiplication or division +operation or it calls another function. + @end table @node RS/6000 and PowerPC Options -- cgit v1.1