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]

Reinstall of i386 movstrsi patch


I reinstalled the patch into the branch.  It turned out the patch was just
fine: the problem was that a hunk had been applied to the wrong place.
I noticed that hunk wasn't where it should have been and added it, but didn't
notice it also was where it shouldn't be, and that's what caused the problem.

I tested this with an x86 bootstrap on the applied sources, so there's no risk
of a mis-application this time.

Sat Feb 24 20:25:29 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/i386/i386.c (ix86_set_move_mem_attrs): New function.
	(ix86_set_move_mem_attrs_1): Likewise.
	* config/i386/i386-protos.h (ix86_set_move_mem_attrs): New declaration.
	* config/i386/i386.md (movstrsi): Call it.

***************
*** 11123,11127 ****
--- 11123,11130 ----
    int align = 0;
    int count = -1;
+   rtx insns;
  
+   start_sequence ();
+ 
    if (GET_CODE (operands[3]) == CONST_INT)
      align = INTVAL (operands[3]);
***************
*** 11137,11141 ****
    srcreg = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
  
!   emit_insn (gen_cld());
  
    /* When optimizing for size emit simple rep ; movsb instruction for
--- 11140,11144 ----
    srcreg = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
  
!   emit_insn (gen_cld ());
  
    /* When optimizing for size emit simple rep ; movsb instruction for
***************
*** 11186,11193 ****
  	 shorter code.  */
        if (!TARGET_INLINE_ALL_STRINGOPS && align < 4)
! 	FAIL;
  
        if (TARGET_SINGLE_STRINGOP)
! 	emit_insn (gen_cld());
  
        countreg2 = gen_reg_rtx (SImode);
--- 11189,11199 ----
  	 shorter code.  */
        if (!TARGET_INLINE_ALL_STRINGOPS && align < 4)
! 	{
! 	  end_sequence ();
! 	  FAIL;
! 	}
  
        if (TARGET_SINGLE_STRINGOP)
! 	emit_insn (gen_cld ());
  
        countreg2 = gen_reg_rtx (SImode);
***************
*** 11289,11292 ****
--- 11295,11304 ----
  	}
      }
+ 
+   insns = get_insns ();
+   end_sequence ();
+ 
+   ix86_set_move_mem_attrs (insns, operands[0], operands[1], destreg, srcreg);
+   emit_insns (insns);
    DONE;
  }")
*** config/i386/i386-protos.h	2001/02/14 22:47:53	1.41
--- config/i386/i386-protos.h	2001/02/25 16:35:48	1.43
*************** extern enum reg_class ix86_preferred_rel
*** 141,144 ****
--- 141,146 ----
  extern int ix86_memory_move_cost PARAMS ((enum machine_mode, enum reg_class,
  					  int));
+ extern void ix86_set_move_mem_attrs PARAMS ((rtx, rtx, rtx, rtx, rtx));
+ 
  
  #ifdef TREE_CODE


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