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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 042FDC433E0 for ; Fri, 26 Jun 2020 21:28:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C443920B1F for ; Fri, 26 Jun 2020 21:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Do/jTUQ4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=agner.ch header.i=@agner.ch header.b="sipHPhUV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C443920B1F 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=F1QTC+emTLAVFLRVXfNQ+73SCT49NnNxqxEh871Q/8Y=; b=Do/jTUQ4BT+6/vEOd1kUvrVXad 5j3ig3sDxPTkryAPkg6yoyiC1cCv61KA61ZM4hmA6tJwz1PeKMLMSDD9arp5KwrXuAuq8CfWlBWCq /CRQU9tJY/g7r/AVF0+cmYrru5LDrdurnBdCVlBxHkFbpdHLZ/XY46+7V5cDKGNg8uRjXc6sdZemR K5ImHu5KJ/F7M+yL0HyAbAjOwxd4vBYvL8XwOAkmasZXfmLvt/yRawmuY6h/qX5k9L1vG9RaueTA1 n+zgvf+8yu7RMBjoOhUapbZQV1qndR+7TEPI5nz7lFF70gi17J4yUVwZyRTDrYJwCfUWaX8c1NOAM ce8cmPrQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jovru-0002Z5-VO; Fri, 26 Jun 2020 21:26:43 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jovrr-0002Y5-Az for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 21:26:40 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3df5::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 9165A5C0678; Fri, 26 Jun 2020 23:26:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1593206793; 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=BliWbyHUANX2JI8zF8nLMmP2MWt1fyzsPb8MhtX5XuI=; b=sipHPhUV8+3lkIgsDOcn1yjFoI/OI6Wq3d3g+xC+T09FCYzYp6yyk6eLfqFCkwwqd7FXMU tD+6GNxBuhOhegup5OlUpgJAbX31uVpzJ5EQD+4boDmw9i8AfDqe9e+JU0Dc6GmQG7V05d 3BkkSMKHc0ACp0Au92vQCTXFTmtjnjk= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH v3 0/3] ARM: make use of UAL VFP mnemonics when possible Date: Fri, 26 Jun 2020 23:26:10 +0200 Message-Id: X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 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 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 To build the kernel with the integrated assembler of Clang 10 and earlier the VFP code needs to make use of the unified assembler language (UAL) VFP mnemonics. As pointed out by Russell, even for ARMv7 blocking VFP access through MCR/MRC is not correct. This has been addressed in upstream Clang and VFP access will be possible through MCR/MRC (see [0]). At first I tried to replace all co-processor instructions to access the floating point unit along with the macros. 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. In v3 reworded commit message and addressed review feedback in patch 1. -- Stefan [0] https://reviews.llvm.org/D59733 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, 72 insertions(+), 25 deletions(-) create mode 100644 arch/arm/Kconfig.assembler -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel