Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1971890pxk; Tue, 1 Sep 2020 12:13:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyzGjMViBOct+Pu2XAQqo1u2L3MiYmdLvQd0IPvzf/ylD9gU3bBOLHxMvad0FSE2ow7Us3 X-Received: by 2002:a17:907:2168:: with SMTP id rl8mr2925862ejb.308.1598987590291; Tue, 01 Sep 2020 12:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598987590; cv=none; d=google.com; s=arc-20160816; b=KqwKmJ7LfWpuAUx3EEEJZ2SziQCpNTJv+7neEhgnsI+9XJBtiZ7Fu98PCTpHncE11D C73BW6v+zjbz+OtZkG7hieQul3gL98t+dqYMdeT+5QqIHT9DfHhOancxQuQJPs3QAG/G 63sDOOtjRS98GQYPccX6yV9N9Xfo7yI2Uf4mmF6YTtHhiEidUB0PBFLGyYQPrvE63h4i I4DPuvqFWHXCPOiBPiUvut04wqFbqxEOqfhYNoK/FRWDc1MBGZWilXmR3s2NFbBPz21S D6TZlYvRzQARAq1gDjrRHGHpQratBMKGfcuZCscKWSQlRrG6DST7wjhBpXudgLbRravA GDSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QdJxiq/30TyHgpb74jViGf50XWJmc9taFThFaM/EMWE=; b=t0D4J5bLGZGjgjT2tUvbEYhDEU4To8JkfBejFMdT5G8Pp+td6hj1B3Sk5qqHx4+I3s 1rRszeCXBFGhpbbNY49I3cd5hPgtOjqbMrwXEUnIbazUYQiCSGacOjk9dn3kCRuKbVcp ryx0AdJllaNrFTXhBaQFDV0lWxD7kvK8ndVJpGufK/67xX71zknCIOyJDBn7qJmVdYxc vBxa2/58uFJMJWMoSDBbLy7DbALWwZvnkZn2p6kkG2WHha8LtV2MSCQFE31ce3lVzle9 v33XZVB7NstoaH80FvxH5EAb8J9DxtXpltVxv6aOEQ1hCX6XWVnu9LaBRvnPfEnXXWxY +ESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=nOKfv7dX; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si1215646ejc.244.2020.09.01.12.12.37; Tue, 01 Sep 2020 12:13:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=nOKfv7dX; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730686AbgIATM2 (ORCPT + 99 others); Tue, 1 Sep 2020 15:12:28 -0400 Received: from mail.zx2c4.com ([192.95.5.64]:38505 "EHLO mail.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728638AbgIATM1 (ORCPT ); Tue, 1 Sep 2020 15:12:27 -0400 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id a87c4a03 for ; Tue, 1 Sep 2020 18:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=Re5z3+odbFyFVMOhKl86dMAnmiE=; b=nOKfv7 dXgamd1Gn6PcAeNmeADuNqr4ZnyvJdPvzEwPTHPhqhYjAKBGxbV212JhktiCA4hu PPZvweECcGN/VDKiPoIrrfCii82keMfQL9MjXTFIqnaFkR4fqUcvPnwGpQHRrZzk O4v0BCcmmNemJTJCRuu+pgFZj8xFXpbTxG2PTKFEIvDa51uwyYJZEP464hBQJCcA jwVQWazlSaTwGXeckTbIAuxWzHCqXsPDp4WDDEV1r35Swols5/7xzI8Qpqjg5+yi vIAx3uqStFqB36URKqlYqSKETMsBcT7rcLreXFSGFg5PLGVXKwEYe2yGoMpTc3G6 A7LJjjzWaxN93rIg== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 294ce59e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 1 Sep 2020 18:44:23 +0000 (UTC) Received: by mail-il1-f179.google.com with SMTP id h11so2337899ilj.11 for ; Tue, 01 Sep 2020 12:12:24 -0700 (PDT) X-Gm-Message-State: AOAM531zBLOIrhODQ6iycxOJh6GXIvWR77L7cmX+JJ/6lQZGQ9iFnz39 oDZqWsPNUYgb4dR6ftkZlCwP5JeSTspi0H0Xge4= X-Received: by 2002:a92:c9c5:: with SMTP id k5mr470934ilq.231.1598987543708; Tue, 01 Sep 2020 12:12:23 -0700 (PDT) MIME-Version: 1.0 References: <20200827173058.94519-1-ubizjak@gmail.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Tue, 1 Sep 2020 21:12:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] crypto/x86: Use XORL r32,32 in curve25519-x86_64.c To: Uros Bizjak , Karthik Bhargavan , Chris.Hawblitzel@microsoft.com, Jonathan Protzenko , Aymeric Fromherz Cc: Linux Crypto Mailing List , X86 ML , Herbert Xu , "David S. Miller" , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Sep 1, 2020 at 8:13 PM Jason A. Donenfeld wrote: > operands are the same. Also, have you seen any measurable differences > when benching this? I can stick it into kbench9000 to see if you > haven't looked yet. On a Skylake server (Xeon Gold 5120), I'm unable to see any measurable difference with this, at all, no matter how much I median or mean or reduce noise by disabling interrupts. One thing that sticks out is that all the replacements of r8-r15 by their %r8d-r15d counterparts still have the REX prefix, as is necessary to access those registers. The only ones worth changing, then, are the legacy registers, and on a whole, this amounts to only 48 bytes of difference.