From patchwork Wed Jun 21 20:19:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Bouron X-Patchwork-Id: 4071 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.22.4 with SMTP id 4csp2060559vsw; Wed, 21 Jun 2017 13:26:06 -0700 (PDT) X-Received: by 10.223.176.51 with SMTP id f48mr24932130wra.106.1498076766432; Wed, 21 Jun 2017 13:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498076766; cv=none; d=google.com; s=arc-20160816; b=xXiUt1Ox6QhYEAoC636d2MvkC0nDaOw/G3GD1PnzqhCLgwx8uODYLDQCQRwmB/vGKj qRK0BsVkD8DDEPSBE42RjRWXXm5OnnrzEBDKWCV9Vq7nGLPrLSQtHuVlYAKBzPvd+9Lx ZeNhC6fMQcXAd06tGS9Ex0+Pa3+GA/iF0U/AkVYAjprVkIAUUtKBAGDAgOLe2dK01r4v dssoiGS+xiaeYnE4J3NC9ZsGuEHlP3jncgtUX9p77qAsdOkmeUbiUSksQNGsQAOIfm25 r/bHsBVr+PMcJnq4jrkY/Iwh1Z1WruND9wF9pNCjv7+nVKqRH0X8uiQU5UjdoJ1A++42 v8Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :to:from:date:dkim-signature:delivered-to:arc-authentication-results; bh=s4Uo9KTd9JnAvOdq+V61tDDEe6UdmXk+Z9mxJN71ClY=; b=xmWqKuk+Koua+odF379LDoShProyKGIHXKqsyq6JT5FmJzTSRkT52M4d1YCHGP8Spp 9XQ86XOzBPNvP7PVIA+BLeXbBRMEOQO6JhHE25qWrflNQq+BTOQg/GIXXa6HXv9YWZcl ajj87i41GJWx8kew2bXfKJ8EGitCk5aPvtAT1cJajSGFVIQDhC4aLXZNLwgii6vnwG1g WFwzY2z4tfLuCLp+6qcEPLkzZwX0V+uwbme+5c/HyhpCLNwMVsfvEZkjrgMPhNl9RCfU Ij11GLYjrVYnSbkkyb5zMUSOrHoM58J8yDMWHvp7BXfSE8jzSbxFwiW2/S+bNk8QCOde zwtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=rVtoVt2o; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i9si17130999wmb.35.2017.06.21.13.26.04; Wed, 21 Jun 2017 13:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=rVtoVt2o; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B80E68A181; Wed, 21 Jun 2017 23:26:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48A62689DDA for ; Wed, 21 Jun 2017 23:25:54 +0300 (EEST) Received: by mail-wr0-f194.google.com with SMTP id k67so1534342wrc.1 for ; Wed, 21 Jun 2017 13:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HiNAGF+7Ox9jATvnidXHRAfQMWwK7mfWSPhN4N+esxM=; b=rVtoVt2oVjgBhTHe8mId2xGaP01g58qG4wBMvXvNXz/Aww31fLHGHCFsICuW5THVUx sNbL6GkxoFUniUrhLjfkEzAQWb/iDILfXp0heG95GgSPn6xWPkrMHygMIXEJVlpd6wSB 7Dvk6Iz3p+Vj7jIQXExq8MWdH1o3ikVc4mE2V8i8xXz4OdQ0j3QcbrTQM9qkl/XcP6uz yBB1Yz2z6VQx+hfxg7ShGIlC0bGwxdVziswWJrVIU1WICys2UEwVCKfhtY07h2oPH++R 4hzzoXNRpxWc2Wdwtt8zC09wpDiFRte2DVTsIOk3VyPednAGYuAQ+vBa90vmFoiSIoeZ 7sIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HiNAGF+7Ox9jATvnidXHRAfQMWwK7mfWSPhN4N+esxM=; b=aAHpKosf0jKEGF05EGqHDynLDBFfNtgtT6vkZarRRcNWXlwGQNAm/2BGahAu2Givl7 2t9cNpMbL+Kd3vz5tgMNsdYsNe7PXWBOC3810mdQxYhRSCZ+xsuWW+fy11mbjKkhKCjI iA8UugNc/pWy4wIC3A1gSsVvY5vZRG1yk66EiocCKzWIwW5EoxIfUe1Q0H/d3mT5T+gA ppVgvdv//glD4qnI1E3sEyNUsjchcIN1gii2SPUBMxSO64aP7CbyiDFbcd1X3FP7B4wp 53SoGPZLE4cFTCWSngbaHqfHx6c9HKx1GmYV03+MnEL5jlzr1f2QQ0gkODN2TSzRVoyV xAgg== X-Gm-Message-State: AKS2vOwSrPRCnV5LMTpSpfkXVNNxGFgB6+0EpJkZXopnUb6Nw/IBIaF3 KLm7JAQDB61aFkd7 X-Received: by 10.28.147.202 with SMTP id v193mr7949038wmd.37.1498076285385; Wed, 21 Jun 2017 13:18:05 -0700 (PDT) Received: from tsuri.lan (AMontsouris-653-1-72-156.w86-212.abo.wanadoo.fr. [86.212.63.156]) by smtp.gmail.com with ESMTPSA id l70sm14947529wmd.3.2017.06.21.13.18.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2017 13:18:04 -0700 (PDT) Date: Wed, 21 Jun 2017 22:19:33 +0200 From: Matthieu Bouron To: FFmpeg development discussions and patches Message-ID: <20170621201933.GB26847@tsuri.lan> References: <20170619090839.15747-1-matthieu.bouron@gmail.com> <22f2c62c-fb36-b49e-76b9-7275427703ed@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <22f2c62c-fb36-b49e-76b9-7275427703ed@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [FFmpeg-devel] [PATCH] checkasm/aarch64: fix tests returning a float X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Wed, Jun 21, 2017 at 04:57:53PM -0300, James Almer wrote: > On 6/19/2017 6:08 AM, Matthieu Bouron wrote: > > Avoids overriding v0 (which containins the result of the tested > > function) in checkasm_call_checked. > > > > Also properly calls checkasm_call_checked. > > --- > > tests/checkasm/aarch64/checkasm.S | 8 ++++---- > > tests/checkasm/checkasm.h | 2 ++ > > 2 files changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/tests/checkasm/aarch64/checkasm.S b/tests/checkasm/aarch64/checkasm.S > > index 53a2a478dc..75a9a56143 100644 > > --- a/tests/checkasm/aarch64/checkasm.S > > +++ b/tests/checkasm/aarch64/checkasm.S > > @@ -112,10 +112,10 @@ function checkasm_checked_call, export=1 > > movi v3.8h, #0 > > > > .macro check_reg_neon reg1, reg2 > > - ldr q0, [x9], #16 > > - uzp1 v1.2d, v\reg1\().2d, v\reg2\().2d > > - eor v0.16b, v0.16b, v1.16b > > - orr v3.16b, v3.16b, v0.16b > > + ldr q1, [x9], #16 > > + uzp1 v2.2d, v\reg1\().2d, v\reg2\().2d > > + eor v1.16b, v1.16b, v2.16b > > + orr v3.16b, v3.16b, v1.16b > > .endm > > check_reg_neon 8, 9 > > check_reg_neon 10, 11 > > diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h > > index 695d871220..5249669fba 100644 > > --- a/tests/checkasm/checkasm.h > > +++ b/tests/checkasm/checkasm.h > > @@ -145,6 +145,8 @@ void checkasm_stack_clobber(uint64_t clobber, ...); > > void checkasm_checked_call(void *func, ...); > > #define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__)\ > > = (void *)checkasm_checked_call; > > +#define declare_new_float(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__)\ > > + = (void *)checkasm_checked_call; > > Isn't this doing the same as the generic "#define declare_new_float" > about 15 lines below? If declare_new_float() is no different than > declare_new() for a given target, then just let the aforementioned check > handle it. You are right (I missed this define), so this chunk is removed from the patch. > > > #define CLOB (UINT64_C(0xdeadbeefdeadbeef)) > > #define call_new(...) (checkasm_stack_clobber(CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,\ > > CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ > > > > Should be ok either way if tested (The only aarch64 FATE client using > git head hasn't run in twenty days, so no way for me to check if this > fixes the problem anyway). I tested on my Odroid-C2 and fate passes with this patch (otherwise it fails on checkasm float_dsp.scalarproduct_float test). I've attached the updated patch. I'll push it in a few hours if there is no objection. From ee4bd4fdb9ac01bd331a43222e9029f820bec4e5 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 19 Jun 2017 10:55:28 +0200 Subject: [PATCH] checkasm/aarch64: fix tests returning a float Avoids overriding v0 (which containins the result of the tested function) in checkasm_call_checked. --- tests/checkasm/aarch64/checkasm.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/aarch64/checkasm.S b/tests/checkasm/aarch64/checkasm.S index 53a2a478dc..75a9a56143 100644 --- a/tests/checkasm/aarch64/checkasm.S +++ b/tests/checkasm/aarch64/checkasm.S @@ -112,10 +112,10 @@ function checkasm_checked_call, export=1 movi v3.8h, #0 .macro check_reg_neon reg1, reg2 - ldr q0, [x9], #16 - uzp1 v1.2d, v\reg1\().2d, v\reg2\().2d - eor v0.16b, v0.16b, v1.16b - orr v3.16b, v3.16b, v0.16b + ldr q1, [x9], #16 + uzp1 v2.2d, v\reg1\().2d, v\reg2\().2d + eor v1.16b, v1.16b, v2.16b + orr v3.16b, v3.16b, v1.16b .endm check_reg_neon 8, 9 check_reg_neon 10, 11 -- 2.13.1