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]

movstrictqi/movstricthi fix for h8300


	The constraint modifiers for the destinations registers of these
patterns were specified as write-only.  This could cause the compiler to
generate a reload that clobbered data.  Setting these constraint modifiers
to read-write fixes the problem; moreover, the comment in reload.c
(push_reload) line 1045 indicates that this is the right thing to do.

2000-09-11  Matthew Hiller  <hiller@redhat.com>

	* config/h8300/h8300.md (movstrictqi): Changed constraint modifier
	on operand 0 to '+'.
	(movstricthi): Likewise.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/h8300/h8300.md,v
retrieving revision 1.17
diff -c -3 -p -r1.17 h8300.md
*** h8300.md	2000/08/14 15:43:07	1.17
--- h8300.md	2000/09/11 20:15:05
***************
*** 153,159 ****
  }")
  
  (define_insn "movstrictqi"
!   [(set (strict_low_part (match_operand:QI 0 "general_operand_dst" "=r,r,r,r"))
  			 (match_operand:QI 1 "general_operand_src" "I,r,n,m"))]
    ""
    "@
--- 153,159 ----
  }")
  
  (define_insn "movstrictqi"
!   [(set (strict_low_part (match_operand:QI 0 "general_operand_dst" "+r,r,r,r"))
  			 (match_operand:QI 1 "general_operand_src" "I,r,n,m"))]
    ""
    "@
***************
*** 217,223 ****
  }")
  
  (define_insn "movstricthi"
!   [(set (strict_low_part (match_operand:HI 0 "general_operand_dst" "=r,r,r,r"))
  			 (match_operand:HI 1 "general_operand_src" "I,r,i,m"))]
    ""
    "@
--- 217,223 ----
  }")
  
  (define_insn "movstricthi"
!   [(set (strict_low_part (match_operand:HI 0 "general_operand_dst" "+r,r,r,r"))
  			 (match_operand:HI 1 "general_operand_src" "I,r,i,m"))]
    ""
    "@


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