From patchwork Tue Mar 10 22:01:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 11430369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CFD8A92A for ; Tue, 10 Mar 2020 22:01:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8906D21927 for ; Tue, 10 Mar 2020 22:01:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f5YjoINF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="myQMTVO9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8906D21927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=agner.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SO7xwnaJE5DjEgPeHsFiv86aX2bOZoyr7PLt54S+dHQ=; b=f5YjoINFc9g5LV pAJThVFYxbR3WHw1Jv0otuHcgfPk+tmp7b0n4lbxUXdFJMYlkbwHcInwT4qVE/BVfrEoRStjMo4Hc wv6Ur/JiHVxMNhpVCjbiNdH8TIrFBvl7PjEN+RCYI8iK2uq9s2VFayK8UVtrPwuFxUtAOKZJ0X7hT 810MBgljLjrS02IOUKcU0NtBPYYxHFysJdsepXPiy/ni8zt4UrcER8Q3RmrC4YXW8eL6OfKgjaVDX e4Jn1uFzsK/ODMlnzBVpFtnF4UxB1x493i3Jstktvrkw62SX8cH99M4NwlcXu9C7RgN/VkeW81U7K V9Wr1Y/bXapFLcj33uUA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBmwX-0002wx-9j; Tue, 10 Mar 2020 22:01:41 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBmwN-0002p7-KL for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2020 22:01:34 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3df5::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 1E5BF5C2157; Tue, 10 Mar 2020 23:01:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1583877685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=y9mUQ47Qx5sWxU4e4s/o/28BEccjHtCQBjF8z/UpJQA=; b=myQMTVO9iLbwC69i6CgS14cavDxa3wRcSvyTw2x8TEZPdhyjXpSUnaXFceu7NNWcTEBJs7 pf3ixShGDXOIbwMQnyWr7xcXSEVSoDaqlJ2gtLApsaVmOJeP5lNv9Be6mTxMbr/3J64CTC 24wOk8GGmKBHVICv329Ipn1ASCGvVNw= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH 0/3] ARM: make use of UAL VFP mnemonics when possible Date: Tue, 10 Mar 2020 23:01:18 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200310_150132_265524_A596C2EE X-CRM114-Status: GOOD ( 12.11 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: clang-built-linux@googlegroups.com, arnd@arndb.de, ard.biesheuvel@linaro.org, ndesaulniers@google.com, linux-kernel@vger.kernel.org, Stefan Agner , jiancai@google.com, yamada.masahiro@socionext.com, manojgupta@google.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org To build the kernel with Clang's integrated assembler the VFP code needs to make use of the unified assembler language (UAL) VFP mnemonics. At first I tried to get rid of the co-processor instructions to access the floating point unit along with the macros completely. However, due to missing FPINST/FPINST2 argument support in older binutils versions we have to keep them around. Once we drop support for binutils 2.24 and older, the move to UAL VFP mnemonics will be straight forward with this changes applied. Tested using Clang with integrated assembler as well as external (binutils assembler), various gcc/binutils version down to 4.7/2.23. Disassembled and compared the object files in arch/arm/vfp/ to make sure this changes leads to the same code. Besides different inlining behavior I was not able to spot a difference. This replaces (and extends) my earlier patch "ARM: use assembly mnemonics for VFP register access" http://lore.kernel.org/r/8bb16ac4b15a7e28a8e819ef9aae20bfc3f75fbc.1582266841.git.stefan@agner.ch --- Stefan Stefan Agner (3): ARM: use .fpu assembler directives instead of assembler arguments ARM: use VFP assembler mnemonics in register load/store macros ARM: use VFP assembler mnemonics if available arch/arm/include/asm/vfp.h | 2 ++ arch/arm/include/asm/vfpmacros.h | 31 ++++++++++++++++++++++--------- arch/arm/vfp/Makefile | 5 ++++- arch/arm/vfp/vfphw.S | 31 ++++++++++++++++++++----------- arch/arm/vfp/vfpinstr.h | 23 +++++++++++++++++++---- 5 files changed, 67 insertions(+), 25 deletions(-)