From patchwork Sun Apr 19 12:35:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 11497323 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 7CB326CA for ; Sun, 19 Apr 2020 12:36:08 +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 51C7321841 for ; Sun, 19 Apr 2020 12:36:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sJGH9eEB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="g4s5RV8F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51C7321841 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=2BO/rsAWfz4LdJdJiPgOIE9wb1YjY2kd+iNli3+h1uo=; b=sJGH9eEByKIc8Z N1HnKewza1vzkeYxOdU2GdMhOds0rmGFzM5EB/T1VzdnBumjEt4NrlsB9dSjm+2FN218atDFDBpQj nbvQV8hvtM+7r4cbKFxCdwUKY3U53/yZHAo5pbh+5M4vWIX8h9B40qJL4/rCLtdYiOGAkWrjSJrnb 9DQjqQlwNE4pbAeARZk68F/AoSPU4tI8jB5CPmEpXtC0Tg2rB4aAZbN7eNbUHIyuJkolLI3zt6yoT 8fZ62eGTVx4V3Z8v28FnFXOzRGwjdQbG6kVdjFCqZ5HQ7FR4xJ+Pe2PVdIYa4jdprscuOx8Fovs/B 0LVfvEt1EQLhN9qv8m8Q==; 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 1jQ9B7-0002cL-NH; Sun, 19 Apr 2020 12:36:05 +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 1jQ9B4-0002ay-RL for linux-arm-kernel@lists.infradead.org; Sun, 19 Apr 2020 12:36:04 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3df5::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id A49755C0C22; Sun, 19 Apr 2020 14:35:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1587299759; 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=ChrUSoSTAeUOQFZlAp8LZ3rHLQuXpNSZx/h/zMpdRro=; b=g4s5RV8FLX58fv8fjP+UnjELhSlF5AIBeSl091K9hGrZ5iR7b+dCZ2F8cOGUKzU8Xw6zXu eUMn3BOQw6Jc9UEK/72rjhh1GxYOQhKbTjbTw1AECYAVpq5Hn/4g8Rh8xSbxfxmllKLZtY pmJctlp8xIO3epChtNBZFSPl9Hl5vV8= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH v2 0/3] ARM: make use of UAL VFP mnemonics when possible Date: Sun, 19 Apr 2020 14:35:48 +0200 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-20200419_053603_033538_E5C62E7E X-CRM114-Status: GOOD ( 12.69 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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. In v2 the check for FPINST argument support is now made in Kconfig. --- 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/Kconfig | 2 ++ arch/arm/Kconfig.assembler | 6 ++++++ arch/arm/include/asm/vfp.h | 2 ++ arch/arm/include/asm/vfpmacros.h | 31 ++++++++++++++++++++++--------- arch/arm/vfp/Makefile | 2 -- arch/arm/vfp/vfphw.S | 31 ++++++++++++++++++++----------- arch/arm/vfp/vfpinstr.h | 23 +++++++++++++++++++---- 7 files changed, 71 insertions(+), 26 deletions(-) create mode 100644 arch/arm/Kconfig.assembler