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/alpha/alpha.md | |
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/alpha/alpha.md')
-rw-r--r-- | gcc/config/alpha/alpha.md | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 0b32f11d469..157e8caf2d6 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -6552,25 +6552,29 @@ [(set_attr "type" "multi") (set_attr "length" "28")]) -(define_expand "clrmemqi" +(define_expand "setmemqi" [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (const_int 0)) + (match_operand 2 "const_int_operand" "")) (use (match_operand:DI 1 "immediate_operand" "")) - (use (match_operand:DI 2 "immediate_operand" ""))])] + (use (match_operand:DI 3 "immediate_operand" ""))])] "" { + /* If value to set is not zero, use the library routine. */ + if (operands[2] != const0_rtx) + FAIL; + if (alpha_expand_block_clear (operands)) DONE; else FAIL; }) -(define_expand "clrmemdi" +(define_expand "setmemdi" [(parallel [(set (match_operand:BLK 0 "memory_operand" "") - (const_int 0)) + (match_operand 2 "const_int_operand" "")) (use (match_operand:DI 1 "immediate_operand" "")) - (use (match_operand:DI 2 "immediate_operand" "")) - (use (match_dup 3)) + (use (match_operand:DI 3 "immediate_operand" "")) + (use (match_dup 4)) (clobber (reg:DI 25)) (clobber (reg:DI 16)) (clobber (reg:DI 17)) @@ -6578,8 +6582,12 @@ (clobber (reg:DI 27))])] "TARGET_ABI_OPEN_VMS" { - operands[3] = gen_rtx_SYMBOL_REF (Pmode, "OTS$ZERO"); - alpha_need_linkage (XSTR (operands[3], 0), 0); + /* If value to set is not zero, use the library routine. */ + if (operands[2] != const0_rtx) + FAIL; + + operands[4] = gen_rtx_SYMBOL_REF (Pmode, "OTS$ZERO"); + alpha_need_linkage (XSTR (operands[4], 0), 0); }) (define_insn "*clrmemdi_1" |