From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27022 invoked by alias); 23 Jun 2017 16:10:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26962 invoked by uid 89); 23 Jun 2017 16:10:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 16:10:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 32CB42B; Fri, 23 Jun 2017 09:10:20 -0700 (PDT) Received: from [10.2.207.43] (e104453-lin.cambridge.arm.com [10.2.207.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 276023F557; Fri, 23 Jun 2017 09:10:19 -0700 (PDT) Subject: Re: [PATCH][Testsuite] Use user defined memmove in gcc.c-torture/execute/builtins/memops-asm-lib.c To: Martin Sebor , "gcc-patches@gcc.gnu.org" , richard.sandiford@arm.com References: <594CDD3A.9090902@foss.arm.com> <67beba0f-5c33-871e-05b1-3244fbb752d6@gmail.com> From: Renlin Li Message-ID: <594D3D63.2000709@foss.arm.com> Date: Fri, 23 Jun 2017 16:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <67beba0f-5c33-871e-05b1-3244fbb752d6@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01805.txt.bz2 Hi Martin, On 23/06/17 16:27, Martin Sebor wrote: > On 06/23/2017 03:19 AM, Renlin Li wrote: >> Hi all, >> >> After the change r249278. bcopy is folded into memmove. And in newlib >> aarch64 >> memmove implementation, it will call memcpy in certain conditions. >> The memcpy defined in memops-asm-lib.c will abort when the test is running. >> >> In this case, I defined a user memmove function which by pass the >> library one. >> So that memcpy won't be called accidentally. >> >> Okay to commit? > > Having memmove call memcpy when there is no overlap seems like > a valid transformation. I don't know which test specifically > fails so the question on my mind is whether it perhaps is overly > restrictive in assuming that this transformation must never take > place. Other than that, although I can't really approve patches, > this one looks okay to me. Thanks for getting to the bottom of > the failure and fixing it! Sorry I didn't mention the regressions. It only happens with aarch64 baremetal targets because of the newlib memmove implementation. FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O0 FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O1 FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O2 FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O3 -g FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -Og -g FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -Os I think the purpose of the test is to check, the original function is not directly called from the main_test function. Instead, those calls are redirected to "my_" version. It will abort otherwise. I CCed Richard Sandiford as he is the original contributor of the test case. Before r249278, bcopy has a corresponding my_bcopy function which is actually got called. Regards, Renlin > > Martin > >> >> gcc/testsuite/ChangeLog: >> >> 2017-06-22 Renlin Li >> Szabolcs Nagy >> >> * gcc.c-torture/execute/builtins/memops-asm-lib.c (my_memmove): New. >> * gcc.c-torture/execute/builtins/memops-asm.c (memmove): Declare >> memmove. >