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] h8300.md: Fix modes in a pattern.


Hi,

Attached is a patch to fix modes in ldm_h8300s_2_normal.

Under TARGET_NORMAL_MODE, we have Pmode == HImode, so we shouldn't use
SImode for addresses.

Tested on h8300-hms.  Committed.

Kazu Hirata

2003-12-26  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.md (ldm_h8300s_2_normal): Use HImode for
	addresses.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.253
diff -c -r1.253 h8300.md
*** h8300.md	4 Dec 2003 04:31:16 -0000	1.253
--- h8300.md	26 Dec 2003 16:13:09 -0000
***************
*** 2090,2100 ****
  
  (define_insn "ldm_h8300s_2_normal"
    [(parallel
!      [(set (reg:SI SP_REG)
! 	   (plus:SI (reg:SI SP_REG) (const_int 8)))
!       (set (mem:SI (plus:SI (reg:SI SP_REG) (const_int 4)))
  	   (match_operand:SI 0 "register_operand" ""))
!       (set (mem:SI (reg:SI SP_REG))
  	   (match_operand:SI 1 "register_operand" ""))])]
    "TARGET_H8300S && TARGET_NORMAL_MODE
     && ((REGNO (operands[0]) == 0 && REGNO (operands[1]) == 1)
--- 2090,2100 ----
  
  (define_insn "ldm_h8300s_2_normal"
    [(parallel
!      [(set (reg:HI SP_REG)
! 	   (plus:HI (reg:HI SP_REG) (const_int 8)))
!       (set (mem:SI (plus:HI (reg:HI SP_REG) (const_int 4)))
  	   (match_operand:SI 0 "register_operand" ""))
!       (set (mem:SI (reg:HI SP_REG))
  	   (match_operand:SI 1 "register_operand" ""))])]
    "TARGET_H8300S && TARGET_NORMAL_MODE
     && ((REGNO (operands[0]) == 0 && REGNO (operands[1]) == 1)


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