diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-28 19:56:23 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-28 19:56:23 +0000 |
commit | 7a3e55649d074f1c14b87a34d8ac900d7f267166 (patch) | |
tree | 1c07634d50dcd55dcccb73af6219e12082ada423 /gcc/config/avr | |
parent | 1774763d780a39d0233820f41aa03e244d0b4033 (diff) | |
download | gcc-7a3e55649d074f1c14b87a34d8ac900d7f267166.tar.gz |
2006-06-28 Adrian Straetling <straetling@de.ibm.com>
* builtins.c: (expand_builtin_memset): Rewrite to support
'set_storage_via_setmem'.
* expr.c: (enum insn_code setmem_optab): Define.
(enum insn_code clrmem_optab): Remove.
(set_storage_via_setmem): New function.
(clear_storage_via_setmem): Remove.
(clear_storage): Replace call to "clear_storage_via_clrmem" with
"set_storage_via_setmem".
* expr.h: (set_storage_via_setmem): Declare.
(CLEAR_RATIO): Redefine using HAVE_setmemM.
* optabs.h: (enum insn_code setmem_optab): Declare.
(enum insn_code clrmem_optab): Remove.
* optabs.c: (init_optabs): Initialize setmem_optab.
(enum insn_code clrmem_optab): Remove.
* genopinit.c: (otabs): Likewise.
* doc/md.texi: Document new standard pattern 'setmem'. Remove
'clrmem'.
* config/alpha/alpha.c: (alpha_expand_block_clear): Adjust
'operands' ordering.
* config/frv/frv.c: (frv_expand_block_clear): Likewise.
* config/rs6000/rs6000.c: (expand_block_clear): Likewise.
* config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM".
FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering.
* config/avr/avr.md: ("clrmemhi"): Likewise.
* config/frv/frv.md: ("clrmemsi"): Likewise.
* config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise.
* config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise.
* config/rs6000/rs6000.md: ("clrmemsi"): Likewise.
* config/s390/s390.md: ("clrmem<mode>"): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr.md | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 6632ae97638..59d35f050e1 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -410,28 +410,32 @@ DONE; }") -;; =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 =0 -;; memset (%0, 0, %1) +;; =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 =%2 +;; memset (%0, %2, %1) -(define_expand "clrmemhi" +(define_expand "setmemhi" [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (const_int 0)) + (match_operand 2 "const_int_operand" "")) (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))])] + (use (match_operand:HI 3 "const_int_operand" "n")) + (clobber (match_scratch:HI 4 "")) + (clobber (match_dup 5))])] "" "{ rtx addr0; int cnt8; enum machine_mode mode; + /* If value to set is not zero, use the library routine. */ + if (operands[2] != const0_rtx) + FAIL; + if (GET_CODE (operands[1]) != CONST_INT) FAIL; cnt8 = byte_immediate_operand (operands[1], GET_MODE (operands[1])); mode = cnt8 ? QImode : HImode; - operands[4] = gen_rtx_SCRATCH (mode); + operands[5] = 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)); |