aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2016-05-24 10:39:13 +0200
committerStefan Liebler <stli@linux.vnet.ibm.com>2016-05-24 10:39:13 +0200
commit074b0f27d9b9cdfb58c5c7e7f4129546084582b2 (patch)
tree60ec9037761a7cff348540574d5d0f3cfea71665
parent04bb21ac93e90d7696bcaf8febe2b2dd2d83585a (diff)
downloadglibc-074b0f27d9b9cdfb58c5c7e7f4129546084582b2.zip
glibc-074b0f27d9b9cdfb58c5c7e7f4129546084582b2.tar.gz
glibc-074b0f27d9b9cdfb58c5c7e7f4129546084582b2.tar.bz2
S390: Use 64bit instruction to check for copies of > 1MB with mvcle.
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.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/s390/s390-64/memcpy.S2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d2b34a8..1bacd71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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):
Jump to 1MB check before executing mvc-loop.
diff --git a/sysdeps/s390/s390-64/memcpy.S b/sysdeps/s390/s390-64/memcpy.S
index e84a357..9d60a14 100644
--- a/sysdeps/s390/s390-64/memcpy.S
+++ b/sysdeps/s390/s390-64/memcpy.S
@@ -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)