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]
Other format: [Raw text]

SH Patch applied to mainline / permission to apply to 3.3 branch?


I've applied the appended patch to the mainline, and
would like to apply it to the 3.3 branch too.
split_branches is supposed to allocate scratch registers
for jumps that are out of the 12 bit range, and prevent
them from being combined by reorg with conditional branches.
This was broken in Febuary last year when the jump
pattern was renamed to jump_compact

Although this is not a very prominent bug, as it took
more than a year to find it, it is also a very low-risk
patch, modifying only config/sh/sh.c by updating references
to a constant that changed its name.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-05-08  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.c (gen_block_redirect, split_branches): Use CODE_FOR_jump_compact
	instead of CODE_FOR_jump

Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.209
diff -p -r1.209 sh.c
*** config/sh/sh.c	17 Apr 2003 10:24:57 -0000	1.209
--- config/sh/sh.c	8 May 2003 19:18:36 -0000
*************** gen_block_redirect (jump, addr, need_blo
*** 3432,3438 ****
        rtx next = next_active_insn (next_active_insn (dest));
        if (next && GET_CODE (next) == JUMP_INSN
  	  && GET_CODE (PATTERN (next)) == SET
! 	  && recog_memoized (next) == CODE_FOR_jump)
  	{
  	  dest = JUMP_LABEL (next);
  	  if (dest
--- 3432,3438 ----
        rtx next = next_active_insn (next_active_insn (dest));
        if (next && GET_CODE (next) == JUMP_INSN
  	  && GET_CODE (PATTERN (next)) == SET
! 	  && recog_memoized (next) == CODE_FOR_jump_compact)
  	{
  	  dest = JUMP_LABEL (next);
  	  if (dest
*************** split_branches (first)
*** 4322,4328 ****
  			|| ((beyond = next_active_insn (beyond))
  			    && GET_CODE (beyond) == JUMP_INSN))
  		    && GET_CODE (PATTERN (beyond)) == SET
! 		    && recog_memoized (beyond) == CODE_FOR_jump
  		    && ((INSN_ADDRESSES
  			 (INSN_UID (XEXP (SET_SRC (PATTERN (beyond)), 0)))
  			 - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252)
--- 4322,4328 ----
  			|| ((beyond = next_active_insn (beyond))
  			    && GET_CODE (beyond) == JUMP_INSN))
  		    && GET_CODE (PATTERN (beyond)) == SET
! 		    && recog_memoized (beyond) == CODE_FOR_jump_compact
  		    && ((INSN_ADDRESSES
  			 (INSN_UID (XEXP (SET_SRC (PATTERN (beyond)), 0)))
  			 - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252)
*************** split_branches (first)
*** 4336,4342 ****
  	    if ((GET_CODE (next) == JUMP_INSN
  		 || GET_CODE (next = next_active_insn (next)) == JUMP_INSN)
  		&& GET_CODE (PATTERN (next)) == SET
! 		&& recog_memoized (next) == CODE_FOR_jump
  		&& ((INSN_ADDRESSES
  		     (INSN_UID (XEXP (SET_SRC (PATTERN (next)), 0)))
  		     - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252)
--- 4336,4342 ----
  	    if ((GET_CODE (next) == JUMP_INSN
  		 || GET_CODE (next = next_active_insn (next)) == JUMP_INSN)
  		&& GET_CODE (PATTERN (next)) == SET
! 		&& recog_memoized (next) == CODE_FOR_jump_compact
  		&& ((INSN_ADDRESSES
  		     (INSN_UID (XEXP (SET_SRC (PATTERN (next)), 0)))
  		     - INSN_ADDRESSES (INSN_UID (insn)) + (unsigned) 252)

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