From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D96FC4332F for ; Thu, 17 Nov 2022 11:52:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239863AbiKQLwp (ORCPT ); Thu, 17 Nov 2022 06:52:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239512AbiKQLwh (ORCPT ); Thu, 17 Nov 2022 06:52:37 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D843959146 for ; Thu, 17 Nov 2022 03:52:29 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F202F13D5; Thu, 17 Nov 2022 03:52:35 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.70.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 842E83F663; Thu, 17 Nov 2022 03:52:28 -0800 (PST) Date: Thu, 17 Nov 2022 11:52:22 +0000 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v1] kselftest/arm64: Use preferred form for predicate load/stores Message-ID: References: <20221117114130.687261-1-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117114130.687261-1-broonie@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Thu, Nov 17, 2022 at 11:41:30AM +0000, Mark Brown wrote: > The preferred form of the str/ldr for predicate registers with an immediate > of zero is to omit the zero, and the clang built in assembler rejects the > zero immediate. Drop the immediate. Rejecting that outright seems like a bug in clang, given there are legitimate reasons to write code that way (e.g. using asm-offsets style definitions); has that been reported so that it can be fixed? Regardless, the patch itself looks fine, and I don't mean to block this as-is! Thanks, Mark. > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/arm64/abi/syscall-abi-asm.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > index b523c21c2278..acd5e9f3bc0b 100644 > --- a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > +++ b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > @@ -153,7 +153,7 @@ do_syscall: > // Only set a non-zero FFR, test patterns must be zero since the > // syscall should clear it - this lets us handle FA64. > ldr x2, =ffr_in > - ldr p0, [x2, #0] > + ldr p0, [x2] > ldr x2, [x2, #0] > cbz x2, 2f > wrffr p0.b > @@ -298,7 +298,7 @@ do_syscall: > cbz x2, 1f > ldr x2, =ffr_out > rdffr p0.b > - str p0, [x2, #0] > + str p0, [x2] > 1: > > // Restore callee saved registers x19-x30 > > base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763 > -- > 2.30.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DED8C433FE for ; Thu, 17 Nov 2022 11:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lgtr49zySkga58RcvkXhoaYTW+0vlpJv/siqbR5Na6k=; b=FZhbO8T4qHo7S2 psukJFr0g5h61jAPxj5HALWITw1wJc4CES5Gaq4EYsT74ABPOzNFt4G5U8D90a6OBrlfeU0/d/u0r XzL23895gKMleDJ3g2F0vZjz2ZdNbb859M0oyIk3sAzfAjwgQsd3D8uzNtodStZLDQL/qbpykouEE B1+8KkBNxVoFIFAV9h+lhZoMP4UJLaTHsNPUuFkaJroCoioZcP+rD4oyFLh/yBz9416VDQJkuP6d/ Fk7WCqX+EtI50fN5eWUqs1ZJF1oP+mG/q+YL+Orhnvn8rJZYMxjNf5PNYD6mGiOVfZEoi7XzUwvPq SACiYRfxyN/U2Oyneqtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovdRf-00DSyM-J9; Thu, 17 Nov 2022 11:52:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovdRb-00DSvw-6X for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2022 11:52:37 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F202F13D5; Thu, 17 Nov 2022 03:52:35 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.70.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 842E83F663; Thu, 17 Nov 2022 03:52:28 -0800 (PST) Date: Thu, 17 Nov 2022 11:52:22 +0000 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v1] kselftest/arm64: Use preferred form for predicate load/stores Message-ID: References: <20221117114130.687261-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221117114130.687261-1-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_035235_303316_1470AC7D X-CRM114-Status: GOOD ( 17.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 17, 2022 at 11:41:30AM +0000, Mark Brown wrote: > The preferred form of the str/ldr for predicate registers with an immediate > of zero is to omit the zero, and the clang built in assembler rejects the > zero immediate. Drop the immediate. Rejecting that outright seems like a bug in clang, given there are legitimate reasons to write code that way (e.g. using asm-offsets style definitions); has that been reported so that it can be fixed? Regardless, the patch itself looks fine, and I don't mean to block this as-is! Thanks, Mark. > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/arm64/abi/syscall-abi-asm.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > index b523c21c2278..acd5e9f3bc0b 100644 > --- a/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > +++ b/tools/testing/selftests/arm64/abi/syscall-abi-asm.S > @@ -153,7 +153,7 @@ do_syscall: > // Only set a non-zero FFR, test patterns must be zero since the > // syscall should clear it - this lets us handle FA64. > ldr x2, =ffr_in > - ldr p0, [x2, #0] > + ldr p0, [x2] > ldr x2, [x2, #0] > cbz x2, 2f > wrffr p0.b > @@ -298,7 +298,7 @@ do_syscall: > cbz x2, 1f > ldr x2, =ffr_out > rdffr p0.b > - str p0, [x2, #0] > + str p0, [x2] > 1: > > // Restore callee saved registers x19-x30 > > base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763 > -- > 2.30.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel