From patchwork Tue Apr 26 12:07:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 11882 Received: (qmail 101634 invoked by alias); 26 Apr 2016 12:08:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 101516 invoked by uid 89); 26 Apr 2016 12:08:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sk:__memcp X-HELO: e06smtp16.uk.ibm.com X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: stli@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: Stefan Liebler To: libc-alpha@sourceware.org Cc: carlos@redhat.com, Wilco.Dijkstra@arm.com, neleai@seznam.cz, Stefan Liebler Subject: [PATCH 2/4] S390: Use 64bit instruction to check for copies of > 1MB with mvcle. Date: Tue, 26 Apr 2016 14:07:47 +0200 Message-Id: <1461672469-2107-2-git-send-email-stli@linux.vnet.ibm.com> In-Reply-To: <1461672469-2107-1-git-send-email-stli@linux.vnet.ibm.com> References: <1461672469-2107-1-git-send-email-stli@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16042612-0025-0000-0000-000013560C81 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)