This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PR target/16884
- From: Denis Chertykov <denisc at overta dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Cc: denisc at overta dot ru
- Date: Thu, 02 Sep 2004 21:14:19 +0400
- Subject: Fix PR target/16884
2004-09-02 Denis Chertykov <denisc@overta.ru>
PR target/16884
* config/avr/avr.md ("movmemhi"): Substitute match_dup to
match_scratch.
(*movmemqi_insn): Likewise.
(*movmemhi): Likewise.
(clrmemhi): Likewise.
(*clrmemqi): Likewise.
(*clrmemhi): Likewise.
Index: avr.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.md,v
retrieving revision 1.46
diff -c -3 -p -r1.46 avr.md
*** avr.md 7 Jul 2004 19:24:09 -0000 1.46
--- avr.md 2 Sep 2004 17:05:11 -0000
***************
*** 350,357 ****
(match_operand:BLK 1 "memory_operand" ""))
(use (match_operand:HI 2 "const_int_operand" ""))
(use (match_operand:HI 3 "const_int_operand" ""))
! (clobber (match_dup 4))
! (clobber (match_dup 5))
(clobber (match_dup 6))])]
""
"{
--- 350,357 ----
(match_operand:BLK 1 "memory_operand" ""))
(use (match_operand:HI 2 "const_int_operand" ""))
(use (match_operand:HI 3 "const_int_operand" ""))
! (clobber (match_scratch:HI 4 ""))
! (clobber (match_scratch:HI 5 ""))
(clobber (match_dup 6))])]
""
"{
***************
*** 363,377 ****
FAIL;
cnt8 = byte_immediate_operand (operands[2], GET_MODE (operands[2]));
mode = cnt8 ? QImode : HImode;
operands[2] = copy_to_mode_reg (mode,
gen_int_mode (INTVAL (operands[2]), mode));
- operands[4] = operands[2];
addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
- operands[5] = addr0;
- operands[6] = addr1;
-
operands[0] = gen_rtx_MEM (BLKmode, addr0);
operands[1] = gen_rtx_MEM (BLKmode, addr1);
}")
--- 363,374 ----
FAIL;
cnt8 = byte_immediate_operand (operands[2], GET_MODE (operands[2]));
mode = cnt8 ? QImode : HImode;
+ operands[6] = gen_rtx_SCRATCH (mode);
operands[2] = copy_to_mode_reg (mode,
gen_int_mode (INTVAL (operands[2]), mode));
addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
addr1 = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
operands[0] = gen_rtx_MEM (BLKmode, addr0);
operands[1] = gen_rtx_MEM (BLKmode, addr1);
}")
***************
*** 381,389 ****
(mem:BLK (match_operand:HI 1 "register_operand" "e")))
(use (match_operand:QI 2 "register_operand" "r"))
(use (match_operand:QI 3 "const_int_operand" "i"))
! (clobber (match_dup 2))
! (clobber (match_dup 0))
! (clobber (match_dup 1))]
""
"ld __tmp_reg__,%a1+
st %a0+,__tmp_reg__
--- 378,386 ----
(mem:BLK (match_operand:HI 1 "register_operand" "e")))
(use (match_operand:QI 2 "register_operand" "r"))
(use (match_operand:QI 3 "const_int_operand" "i"))
! (clobber (match_scratch:HI 4 "=0"))
! (clobber (match_scratch:HI 5 "=1"))
! (clobber (match_scratch:QI 6 "=2"))]
""
"ld __tmp_reg__,%a1+
st %a0+,__tmp_reg__
***************
*** 397,405 ****
(mem:BLK (match_operand:HI 1 "register_operand" "e,e")))
(use (match_operand:HI 2 "register_operand" "!w,d"))
(use (match_operand:HI 3 "const_int_operand" ""))
! (clobber (match_dup 2))
! (clobber (match_dup 0))
! (clobber (match_dup 1))]
""
"*{
if (which_alternative==0)
--- 394,402 ----
(mem:BLK (match_operand:HI 1 "register_operand" "e,e")))
(use (match_operand:HI 2 "register_operand" "!w,d"))
(use (match_operand:HI 3 "const_int_operand" ""))
! (clobber (match_scratch:HI 4 "=0,0"))
! (clobber (match_scratch:HI 5 "=1,1"))
! (clobber (match_scratch:HI 6 "=2,2"))]
""
"*{
if (which_alternative==0)
***************
*** 425,431 ****
(const_int 0))
(use (match_operand:HI 1 "const_int_operand" ""))
(use (match_operand:HI 2 "const_int_operand" "n"))
! (clobber (match_dup 3))
(clobber (match_dup 4))])]
""
"{
--- 422,428 ----
(const_int 0))
(use (match_operand:HI 1 "const_int_operand" ""))
(use (match_operand:HI 2 "const_int_operand" "n"))
! (clobber (match_scratch:HI 3 ""))
(clobber (match_dup 4))])]
""
"{
***************
*** 438,450 ****
cnt8 = byte_immediate_operand (operands[1], GET_MODE (operands[1]));
mode = cnt8 ? QImode : HImode;
operands[1] = copy_to_mode_reg (mode,
gen_int_mode (INTVAL (operands[1]), mode));
- operands[3] = operands[1];
-
addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
- operands[4] = addr0;
-
operands[0] = gen_rtx_MEM (BLKmode, addr0);
}")
--- 435,444 ----
cnt8 = byte_immediate_operand (operands[1], GET_MODE (operands[1]));
mode = cnt8 ? QImode : HImode;
+ operands[4] = gen_rtx_SCRATCH (mode);
operands[1] = copy_to_mode_reg (mode,
gen_int_mode (INTVAL (operands[1]), mode));
addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0));
operands[0] = gen_rtx_MEM (BLKmode, addr0);
}")
***************
*** 453,460 ****
(const_int 0))
(use (match_operand:QI 1 "register_operand" "r"))
(use (match_operand:QI 2 "const_int_operand" "n"))
! (clobber (match_dup 1))
! (clobber (match_dup 0))]
""
"st %a0+,__zero_reg__
dec %1
--- 447,454 ----
(const_int 0))
(use (match_operand:QI 1 "register_operand" "r"))
(use (match_operand:QI 2 "const_int_operand" "n"))
! (clobber (match_scratch:HI 3 "=0"))
! (clobber (match_scratch:QI 4 "=1"))]
""
"st %a0+,__zero_reg__
dec %1
***************
*** 467,474 ****
(const_int 0))
(use (match_operand:HI 1 "register_operand" "!w,d"))
(use (match_operand:HI 2 "const_int_operand" "n,n"))
! (clobber (match_dup 1))
! (clobber (match_dup 0))]
""
"*{
if (which_alternative==0)
--- 461,468 ----
(const_int 0))
(use (match_operand:HI 1 "register_operand" "!w,d"))
(use (match_operand:HI 2 "const_int_operand" "n,n"))
! (clobber (match_scratch:HI 3 "=0,0"))
! (clobber (match_scratch:HI 4 "=1,1"))]
""
"*{
if (which_alternative==0)