Hi, This patch fixes G10 target support for interrupt functions in the recently submitted patch, "Improve interrupt function generation" http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00011.html
The G10 target does not support the "sel rbn" insn as it has only bank 0. Conditions have been added to check for this. Tested with rl78-elf target simulator. Regards, Vinay Kumar vina...@kpitcummins.com gcc/ChangeLog 2013-05-06 Vinay Kumar <vina...@kpitcummins.com> * config/rl78/rl78.c (rl78_expand_prologue): G10 target support added. (rl78_expand_epilogue): G10 target support added. --- rl78.c.org 2013-05-06 12:25:05.000000000 +0530 +++ rl78.c 2013-05-06 12:51:29.000000000 +0530 @@ -1020,7 +1020,7 @@ rl78_expand_prologue (void) if (rl78_is_naked_func ()) return; - rb = is_interrupt_func (cfun->decl) ? -1 : 0; + rb = (is_interrupt_func (cfun->decl) && !TARGET_G10)? -1 : 0; if (!cfun->machine->computed) rl78_compute_frame_info (); @@ -1049,7 +1049,7 @@ rl78_expand_prologue (void) } /* Interrupt functions use rb3 instead of rb0. */ - if (is_interrupt_func (cfun->decl)) + if (is_interrupt_func (cfun->decl) && !TARGET_G10) { if (rb != 3) emit_insn (gen_sel_rb (GEN_INT (3))); @@ -1089,7 +1089,7 @@ rl78_expand_epilogue (void) if (rl78_is_naked_func ()) return; - rb = is_interrupt_func (cfun->decl) ? 3 : 0; + rb = (is_interrupt_func (cfun->decl) && !TARGET_G10) ? 3 : 0; if (frame_pointer_needed) {