]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
S390: Use 64bit instruction to check for copies of > 1MB with mvcle.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Tue, 24 May 2016 08:39:13 +0000 (10:39 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Tue, 24 May 2016 08:39:13 +0000 (10:39 +0200)
The __memcpy_default variant on s390 64bit calculates the number of
256byte blocks in a 64bit register and checks, if they exceed 1MB
to jump to mvcle. Otherwise a mvc-loop is used. The compare-instruction
only checks a 32bit value.
This patch uses a 64bit compare.

ChangeLog:

* sysdeps/s390/s390-64/memcpy.S (memcpy):
Use cghi instead of chi to compare 64bit value.

ChangeLog
sysdeps/s390/s390-64/memcpy.S

index d2b34a847863e4fbd65e96d957f74691696d6422..1bacd7172e9c87a1666476ec39369fa966e959d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * sysdeps/s390/s390-64/memcpy.S (memcpy):
+       Use cghi instead of chi to compare 64bit value.
+
 2016-05-24  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * sysdeps/s390/s390-32/memcpy.S (memcpy):
index e84a3572cbdcb92fa112866bfc47b2fdbde10794..9d60a14cccdbee76f85acfb6a5479807fa00488e 100644 (file)
@@ -47,7 +47,7 @@ ENTRY(memcpy)
 .L_Z900_4:
        br      %r14
 .L_Z900_13:
-       chi     %r5,4096             # Switch to mvcle for copies >1MB
+       cghi    %r5,4096            # Switch to mvcle for copies >1MB
        jh      __memcpy_mvcle
 .L_Z900_12:
        mvc     0(256,%r1),0(%r3)