This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "return" expander


>>>>> "Bernd" == Bernd Schmidt <bernds@redhat.com> writes:
Bernd> I had the same problem with a new port I'm about to contribute.  I've used
Bernd> the following patch.  I'll be checking this in once I bootstrap it on
Bernd> i686-linux.

Cool :) Yesterday I bootstrapped and regtested (C,C++) the same patch
on i686-pc-linux-gnu and arm-unknown-elf.

~velco

Bernd> Bernd

Bernd> 	* genemit.c (gen_expand): Recognize return insns even if the return
Bernd> 	appears in a parallel.

Bernd> Index: genemit.c
Bernd> ===================================================================
Bernd> RCS file: /cvs/gcc/egcs/gcc/genemit.c,v
Bernd> retrieving revision 1.76
Bernd> diff -c -p -r1.76 genemit.c
Bernd> *** genemit.c	22 Jul 2002 14:20:20 -0000	1.76
Bernd> --- genemit.c	29 Jul 2002 11:24:33 -0000
Bernd> *************** gen_expand (expand)
Bernd> *** 524,531 ****
Bernd>         rtx next = XVECEXP (expand, 1, i);
Bernd>         if ((GET_CODE (next) == SET && GET_CODE (SET_DEST (next)) == PC)
Bernd>   	  || (GET_CODE (next) == PARALLEL
Bernd> ! 	      && GET_CODE (XVECEXP (next, 0, 0)) == SET
Bernd> ! 	      && GET_CODE (SET_DEST (XVECEXP (next, 0, 0))) == PC)
Bernd>   	  || GET_CODE (next) == RETURN)
Bernd>   	printf ("  emit_jump_insn (");
Bernd>         else if ((GET_CODE (next) == SET && GET_CODE (SET_SRC (next)) == CALL)
Bernd> --- 524,532 ----
Bernd>         rtx next = XVECEXP (expand, 1, i);
Bernd>         if ((GET_CODE (next) == SET && GET_CODE (SET_DEST (next)) == PC)
Bernd>   	  || (GET_CODE (next) == PARALLEL
Bernd> ! 	      && ((GET_CODE (XVECEXP (next, 0, 0)) == SET
Bernd> ! 		   && GET_CODE (SET_DEST (XVECEXP (next, 0, 0))) == PC)
Bernd> ! 		  || GET_CODE (XVECEXP (next, 0, 0)) == RETURN))
Bernd>   	  || GET_CODE (next) == RETURN)
Bernd>   	printf ("  emit_jump_insn (");
Bernd>         else if ((GET_CODE (next) == SET && GET_CODE (SET_SRC (next)) == CALL)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]