This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 2/4] S390: Use 64bit instruction to check for copies of > 1MB with mvcle.
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: carlos at redhat dot com, Wilco dot Dijkstra at arm dot com, neleai at seznam dot cz, Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Date: Tue, 26 Apr 2016 14:07:47 +0200
- Subject: [PATCH 2/4] S390: Use 64bit instruction to check for copies of > 1MB with mvcle.
- Authentication-results: sourceware.org; auth=none
- References: <1461672469-2107-1-git-send-email-stli at linux dot vnet dot ibm dot com>
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.
---
sysdeps/s390/s390-64/memcpy.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.3.0