This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
S/390: Fix target/11992
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 17 Dec 2003 22:54:51 +0100 (CET)
- Subject: S/390: Fix target/11992
Hello,
this fixes PR target/11992 which was caused by use of the instruction CLCL
to implement memcmp; that instruction cannot compare memory areas larger
than 2^24 bytes. Fixed by using CLCLE instead, which does not have that
restriction.
Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux on both
CVS head and the 3.3 branch. Applied to both.
Bye,
Ulrich
ChangeLog:
PR target/11992
* config/s390/s390.md ("*cmpmem_long_64"): Use CLCLE instruction
instead of CLCL.
("*cmpmem_long_31"): Likewise.
Index: gcc/config/s390/s390.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
retrieving revision 1.88
diff -c -p -r1.88 s390.md
*** gcc/config/s390/s390.md 13 Dec 2003 04:44:08 -0000 1.88
--- gcc/config/s390/s390.md 17 Dec 2003 11:35:34 -0000
***************
*** 2080,2088 ****
(use (match_dup 2))
(use (match_dup 3))]
"TARGET_64BIT"
! "clcl\t%0,%1"
! [(set_attr "op_type" "RR")
! (set_attr "type" "vs")])
(define_insn "*cmpmem_long_31"
[(clobber (match_operand:DI 0 "register_operand" "=d"))
--- 2080,2089 ----
(use (match_dup 2))
(use (match_dup 3))]
"TARGET_64BIT"
! "clcle\t%0,%1,0\;jo\t.-4"
! [(set_attr "op_type" "NN")
! (set_attr "type" "vs")
! (set_attr "length" "8")])
(define_insn "*cmpmem_long_31"
[(clobber (match_operand:DI 0 "register_operand" "=d"))
***************
*** 2093,2101 ****
(use (match_dup 2))
(use (match_dup 3))]
"!TARGET_64BIT"
! "clcl\t%0,%1"
! [(set_attr "op_type" "RR")
! (set_attr "type" "vs")])
; Convert condition code to integer in range (-1, 0, 1)
--- 2094,2103 ----
(use (match_dup 2))
(use (match_dup 3))]
"!TARGET_64BIT"
! "clcle\t%0,%1,0\;jo\t.-4"
! [(set_attr "op_type" "NN")
! (set_attr "type" "vs")
! (set_attr "length" "8")])
; Convert condition code to integer in range (-1, 0, 1)
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de