This is the mail archive of the gcc-patches@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]

Fix my bonehead jump.c patch



Doh.  gen_jump automatically wraps the target inside a LABEL_REF.  So my
jump.c change on the mainline was clearly wrong.

This fixes the bug and survives bootstrapping

	* jump.c (jump_optimize_1): Do not wrap the new jump target
	inside a LABEL_REF; gen_jump will do that automatically.

Index: jump.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/jump.c,v
retrieving revision 1.171
diff -c -3 -p -r1.171 jump.c
*** jump.c	2001/05/10 15:15:48	1.171
--- jump.c	2001/05/10 20:41:43
*************** jump_optimize_1 (f, cross_jump, noop_mov
*** 608,616 ****
  		      do_cross_jump (insn, newjpos, newlpos);
  		      /* Make the old conditional jump
  			 into an unconditional one.  */
! 		      PATTERN (insn)
! 			 = gen_jump (gen_rtx_LABEL_REF (VOIDmode,
! 							JUMP_LABEL (insn)));
  		      INSN_CODE (insn) = -1;
  		      emit_barrier_after (insn);
  		      /* Add to jump_chain unless this is a new label
--- 608,614 ----
  		      do_cross_jump (insn, newjpos, newlpos);
  		      /* Make the old conditional jump
  			 into an unconditional one.  */
! 		      PATTERN (insn) = gen_jump (JUMP_LABEL (insn));
  		      INSN_CODE (insn) = -1;
  		      emit_barrier_after (insn);
  		      /* Add to jump_chain unless this is a new label





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