diff options
author | Adrian Straetling <straetling@de.ibm.com> | 2005-08-26 06:49:57 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2005-08-26 06:49:57 +0000 |
commit | 742090fc6f48db006c598a5ad829047724796aa0 (patch) | |
tree | 041850d2ac0283600e53adf93284b676fbb0226f /gcc | |
parent | db21e1d01a3f6ca4f7d6c9f151620bae7b66b661 (diff) | |
download | gcc-742090fc6f48db006c598a5ad829047724796aa0.zip gcc-742090fc6f48db006c598a5ad829047724796aa0.tar.gz gcc-742090fc6f48db006c598a5ad829047724796aa0.tar.bz2 |
s390.md: ("movstr", "*movstr"): Add patterns.
2005-08-26 Adrian Straetling <straetling@de.ibm.com>
* config/s390/s390.md: ("movstr", "*movstr"): Add patterns.
(UNSPEC_MVST): New constant.
From-SVN: r103516
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 43 |
2 files changed, 48 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 84b1da0..837d6e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-08-26 Adrian Straetling <straetling@de.ibm.com> + + * config/s390/s390.md: ("movstr", "*movstr"): Add patterns. + (UNSPEC_MVST): New constant. + 2005-08-26 Andreas Krebbel <krebbel1@de.ibm.com> * config/s390/predicates.md ("shift_count_operand", "setmem_operand"): diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index e4d7097..84e58d7 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -130,6 +130,7 @@ ; String Functions (UNSPEC_SRST 600) + (UNSPEC_MVST 601) ; Stack Smashing Protector (UNSPEC_SP_SET 700) @@ -1944,6 +1945,48 @@ (set_attr "type" "vs")]) ; +; movstr instruction pattern. +; + +(define_expand "movstr" + [(set (reg:SI 0) (const_int 0)) + (parallel + [(clobber (match_dup 3)) + (set (match_operand:BLK 1 "memory_operand" "") + (match_operand:BLK 2 "memory_operand" "")) + (set (match_operand 0 "register_operand" "") + (unspec [(match_dup 1) + (match_dup 2) + (reg:SI 0)] UNSPEC_MVST)) + (clobber (reg:CC CC_REGNUM))])] + "" +{ + rtx addr1 = gen_reg_rtx (Pmode); + rtx addr2 = gen_reg_rtx (Pmode); + + emit_move_insn (addr1, force_operand (XEXP (operands[1], 0), NULL_RTX)); + emit_move_insn (addr2, force_operand (XEXP (operands[2], 0), NULL_RTX)); + operands[1] = replace_equiv_address_nv (operands[1], addr1); + operands[2] = replace_equiv_address_nv (operands[2], addr2); + operands[3] = addr2; +}) + +(define_insn "*movstr" + [(clobber (match_operand:P 2 "register_operand" "=d")) + (set (mem:BLK (match_operand:P 1 "register_operand" "0")) + (mem:BLK (match_operand:P 3 "register_operand" "2"))) + (set (match_operand:P 0 "register_operand" "=d") + (unspec [(mem:BLK (match_dup 1)) + (mem:BLK (match_dup 3)) + (reg:SI 0)] UNSPEC_MVST)) + (clobber (reg:CC CC_REGNUM))] + "" + "mvst\t%1,%2\;jo\t.-4" + [(set_attr "length" "8") + (set_attr "type" "vs")]) + + +; ; movmemM instruction pattern(s). ; |