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]

patch applied to sh.md


This fixes some 'pcrel too far' problems.  Applied to mainline and 3.4
branch.

2004-08-13  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.md (cbranch define_delay) Use cond_delay_slot for
	non-anulled condition too.

Index: config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.180
diff -p -r1.180 sh.md
*** config/sh/sh.md	29 Jul 2004 07:37:16 -0000	1.180
--- config/sh/sh.md	13 Aug 2004 15:22:06 -0000
***************
*** 524,535 ****
  ;; Say that we have annulled true branches, since this gives smaller and
  ;; faster code when branches are predicted as not taken.
  
  (define_delay
    (and (eq_attr "type" "cbranch")
         (ne (symbol_ref "TARGET_SH2") (const_int 0)))
    ;; SH2e has a hardware bug that pretty much prohibits the use of
    ;; annuled delay slots.
!   [(eq_attr "in_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
  					(not (eq_attr "cpu" "sh2e"))) (nil)])
  
  ;; -------------------------------------------------------------------------
--- 524,539 ----
  ;; Say that we have annulled true branches, since this gives smaller and
  ;; faster code when branches are predicted as not taken.
  
+ ;; ??? The non-annulled condition should really be "in_delay_slot",
+ ;; but insns that can be filled in non-annulled get priority over insns
+ ;; that can only be filled in anulled.
+ 
  (define_delay
    (and (eq_attr "type" "cbranch")
         (ne (symbol_ref "TARGET_SH2") (const_int 0)))
    ;; SH2e has a hardware bug that pretty much prohibits the use of
    ;; annuled delay slots.
!   [(eq_attr "cond_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
  					(not (eq_attr "cpu" "sh2e"))) (nil)])
  
  ;; -------------------------------------------------------------------------


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