Hi, The attached patch is to solve PR target/41993 which will affect targets using MODE_EXIT. Without it, we can't find all return registers for __builtin_return in mode-switching.c:create_pre_exit. See the trail #4 by Uros in the PR for the details. The patch is tested with bootstrap and regtested on i686-pc-linux-gnu with no new failures. It's also tested on cross sh4-unknown-linux-gnu. OK for trunk?
Regards, kaz -- 2012-11-05 Uros Bizjak <ubiz...@gmail.com> Kaz Kojima <kkoj...@gcc.gnu.org> PR target/41993 * mode-switching.c (create_pre_exit): Set return_copy to last_insn when copy_start is a pseudo reg. --- ORIG/trunk/gcc/mode-switching.c 2012-11-05 08:07:55.000000000 +0900 +++ trunk/gcc/mode-switching.c 2012-11-05 19:22:56.000000000 +0900 @@ -324,7 +324,10 @@ create_pre_exit (int n_entities, int *en else break; if (copy_start >= FIRST_PSEUDO_REGISTER) - break; + { + last_insn = return_copy; + continue; + } copy_num = hard_regno_nregs[copy_start][GET_MODE (copy_reg)];