Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3469062ybl; Mon, 12 Aug 2019 00:38:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBQRkZu7E30sMsEjoroJ+KGmICltqw6gXemTN9Dn617oPXoqTi7sLNy1n2YPxrHdbR7y+Z X-Received: by 2002:a62:28b:: with SMTP id 133mr34123688pfc.251.1565595484373; Mon, 12 Aug 2019 00:38:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565595484; cv=none; d=google.com; s=arc-20160816; b=N1v/sI6mOX76IZQmqKZ46ACooV8dUW7rnon+NBG21IIPNKbvGqZEmvnvc8JY2I83yw deeTi6XJDMrl83C1pmZdOnk+hyu5mbEmzpWtMeSjHy5kJSyw2Ftl+UmcgP83/ZsGTLQv aqhBFfMkRvEJ1BcaiiOIzTBPvS4wMb7WjEZBp/SYiw714KtxrOWs7c8LXmsI6KXSd3g+ 1h3OvHfui1RqKkJRrRHsYz7q/x8fUdzZl5LwJsYvr6PbFGMESsIFBWJRMbw3lOK9xLf7 F5CGf1NxEd9xE8cm+7tMNUVr0t4vCo61yv1fdNUHfICsCynLjk8SGvhJX8IyiYGhL3Ub Q0HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=fC1flKDqE8eSYHtB5rn/dx/72WFNGY6fL6pr1iNPkpM=; b=vnNTWOvQ8EQ1+NKfg3SOBhXCD61r9NhdjsOCZ0L2XU+3L/NYGxC89OlySvQIHUZvwm VByyQjvo88Q7Bh0sQ+iMqBAsBSsZFtiYWYpJljqFHH+IeqgN0t4ZIm2NTnFFDCYek4Cq a39/oXR2X26MnZdys2uyR1Rrah1WVRTaH7JZZzPePElHpETCpc7d6UkSswCpZ1U1qVuT FxCJ7tQR2lLqMI5h6jVKQpei6o/zXkvU+Tv0IQPdbrH/+Za66pWLfGvYohrq4n/uE/n1 UIWqh2lzHXcw7pNAOxuAL6bT70JyQBMH0qWZ97JyQ4v5KTBB3VdYbcpANzTAuMnNBEqe OlnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=fUXVnl85; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f196si9175316pfa.57.2019.08.12.00.37.47; Mon, 12 Aug 2019 00:38:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=fUXVnl85; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbfHLHf7 (ORCPT + 99 others); Mon, 12 Aug 2019 03:35:59 -0400 Received: from mail.kapsi.fi ([91.232.154.25]:56563 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbfHLHf6 (ORCPT ); Mon, 12 Aug 2019 03:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fC1flKDqE8eSYHtB5rn/dx/72WFNGY6fL6pr1iNPkpM=; b=fUXVnl85Fwp6d3xSIagnpBzBQL SYg2zbwGiAURcO2EGXgqOcwed7HfQMIk60hIH/zJvsn9VNUmiPk+4o61JDxxVGJjJTmmXAOB438u6 qfwPbP2MqUon2o0sS5zyHtMwr2JNkp2ikUwGwjk/OkCcToTeVO4CUjmxTwes890+CQmdXdjpiIUxR lLv9eZ46xOMT+ndbjT/Umki55Xlz562MQ53XRbwaPS8eWBg3smkOurQod9rSLGfkMny3w7pbtgPFA PbEueE56IJJg34/O68s3qbqUyDQvg400mNXj1He3h43rL9/EGhRIAt8ytnDyS/jQRepUq0mS/VoPS EBhrg/bw==; Received: from oul114-218.netplaza.fi ([80.75.107.218] helo=[10.0.1.247]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hx4rx-0001lt-Uf; Mon, 12 Aug 2019 10:35:53 +0300 Subject: Re: [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang To: Nathan Chancellor , Ralf Baechle , Paul Burton , James Hogan Cc: Nick Desaulniers , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Vladimir Serbinenko References: <20190812033120.43013-1-natechancellor@gmail.com> <20190812033120.43013-4-natechancellor@gmail.com> From: Jussi Kivilinna Openpgp: preference=signencrypt Autocrypt: addr=jussi.kivilinna@iki.fi; prefer-encrypt=mutual; keydata= mQGNBE3ihugBDADESXATJw5TPYbTHDZfl6qkS/CPbn9ecRZnL74h5w1grX7gjsscafjj7s9G Yf8hkapJ72rlR2vG54MufsUUKGde5hkJ0Ntvgt2I0LjQM2+tqGkBm4NAi4tVdUsXZiWTlSWd kTtlk7jVUH2IcYZU/VE7qeq9UNAGd+h/XEE0ytolcf1Ou84H/Nd4FE6vxCACLhV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BIj5AL+QEwP21nx+VDqUjIGgYAj1jRUA/T3 FbYXJE+I3G9PmAov2JlxQSG7ECzQS5ZRkTPXUgv/f3nCEYM0A6tDGqtSXcD4Gavl6ozDu4PD V/387JqjxmWks/rX6OVtLXeiVwfHaS8pG027kVgmvpiSzwHP9HlgingiSt5pfx3eUwWMosg1 hjPoPsVqRii9keJ7YeeZm9Oyu2qfF9ANivB3JEHah+xGodFvYT4HhW99VKEigRIs50I84xcL A+S2TkpBBRK+L2+DxbCVTAQbphP3uzC17ycOrRsWWR8Uq1xAjcle3YMumo/ChHlQyrA+0NZR PATCiJCz4HMGL57lDCId7xVDLb+M2VimGbGxMDHP1Cg9BKCp9oc+T2TeHC3fas4va1f2iXJk LbQY9oVvMmuyJvFyg8jnMHLOAVzvFbvT8XtWcL0kwePmgSwUY6RrZcRxn1Egk3UKioU7n4uK VmD7uQ+cf92mQtoiS1ceGKCT5CBPJF2PV/7Q5wBnN+R8WWAjtGPXshA5A9pB9DKjBXgVGPXY NYA8W1oeddC39o0ipr/NWR6cEMmPW5Qrn2Q0zqWdHuVfq4Me Message-ID: Date: Mon, 12 Aug 2019 10:35:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190812033120.43013-4-natechancellor@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 80.75.107.218 X-SA-Exim-Mail-From: jussi.kivilinna@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 12.8.2019 6.31, Nathan Chancellor wrote: > From: Vladimir Serbinenko > > clang doesn't recognise =l / =h assembly operand specifiers but apparently > handles C version well. > > lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a > inline asm context requiring an l-value: remove the cast or build with > -fheinous-gnu-extensions > umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb); > ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > lib/mpi/longlong.h:652:20: note: expanded from macro 'umul_ppmm' > : "=l" ((USItype)(w0)), \ > ~~~~~~~~~~^~~ > lib/mpi/generic_mpih-mul1.c:37:3: error: invalid output constraint '=h' > in asm > umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb); > ^ > lib/mpi/longlong.h:653:7: note: expanded from macro 'umul_ppmm' > "=h" ((USItype)(w1)) \ > ^ > 2 errors generated. > > Fixes: 5ce3e312ec5c ("crypto: GnuPG based MPI lib - header files (part 2)") > Link: https://github.com/ClangBuiltLinux/linux/issues/605 > Link: https://github.com/gpg/libgcrypt/commit/1ecbd0bca31d462719a2a6590c1d03244e76ef89 > Signed-off-by: Vladimir Serbinenko > [jk: add changelog, rebase on libgcrypt repository, reformat changed > line so it does not go over 80 characters] > Signed-off-by: Jussi Kivilinna This is my signed-off-by for libgcrypt project, not kernel. I do not think signed-offs can be passed from other projects in this way. -Jussi > [nc: Added build error and tags to commit message > Added Vladimir's signoff with his permission > Adjusted Jussi's comment to wrap at 73 characters > Modified commit subject to mirror MIPS64 commit > Removed space between defined and (__clang__)] > Signed-off-by: Nathan Chancellor > --- > lib/mpi/longlong.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h > index 3bb6260d8f42..8a1507fc94dd 100644 > --- a/lib/mpi/longlong.h > +++ b/lib/mpi/longlong.h > @@ -639,7 +639,8 @@ do { \ > ************** MIPS ***************** > ***************************************/ > #if defined(__mips__) && W_TYPE_SIZE == 32 > -#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) > +#if defined(__clang__) || (__GNUC__ >= 5) || (__GNUC__ == 4 && \ > + __GNUC_MINOR__ >= 4) > #define umul_ppmm(w1, w0, u, v) \ > do { \ > UDItype __ll = (UDItype)(u) * (v); \ >