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: Split edge fails when performed on a doloop jump on x86 port


On Thu, 2004-02-19 at 00:42, Mostafa Hagog wrote:
> Since I am not familiar with the x86 port,
> can you please commit this fix?

I added the following patch to fix the problem.  This is the patch I
suggested.  I tested it with a bootstrap and regression check.

The idiom in the condition is also used in the {neg,abs}{sf,df}*
patterns, so it should not be a problem here.

2004-02-19  James E Wilson  <wilson@specifixinc.com>

	* config/i386/i386.md (doloop_end_internal): Use nonimmediate_operand
	for operand2.  Add condition that requires register_operand operand2
	before reload.

Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.510
diff -p -r1.510 i386.md
*** i386.md	11 Feb 2004 23:39:36 -0000	1.510
--- i386.md	20 Feb 2004 01:14:31 -0000
***************
*** 13470,13481 ****
  			  (const_int 1))
  		      (label_ref (match_operand 0 "" ""))
  		      (pc)))
!    (set (match_operand:SI 2 "register_operand" "=1,1,*m*r")
  	(plus:SI (match_dup 1)
  		 (const_int -1)))
     (clobber (match_scratch:SI 3 "=X,X,r"))
     (clobber (reg:CC 17))]
!   "!TARGET_64BIT && TARGET_USE_LOOP"
  {
    if (which_alternative != 0)
      return "#";
--- 13470,13483 ----
  			  (const_int 1))
  		      (label_ref (match_operand 0 "" ""))
  		      (pc)))
!    (set (match_operand:SI 2 "nonimmediate_operand" "=1,1,*m*r")
  	(plus:SI (match_dup 1)
  		 (const_int -1)))
     (clobber (match_scratch:SI 3 "=X,X,r"))
     (clobber (reg:CC 17))]
!   "!TARGET_64BIT && TARGET_USE_LOOP
!    && (reload_in_progress || reload_completed
!        || register_operand (operands[2], VOIDmode))"
  {
    if (which_alternative != 0)
      return "#";
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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