From patchwork Tue Feb 13 10:24:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 872747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-473144-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Se/BhyFD"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgdvY2Qdgz9t61 for ; Tue, 13 Feb 2018 21:24:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=sMAscLWjgpJXVTnKO962izXlJYT2IspedxAlIXiLfBOBjftfds vREvfPn2P0uVdaVYthxAVdpXlNKUT87w/A5EjwrhT8+Gzeoo8/c4Xi3uEmBFI3Pv ZBvn5suJg7ZjYdNq4g537RHl+1nApLl1SqCk7IS707X4a+3E5Bqgi/6DI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=tn+wb7XM0zb6Lejeo2+CUWsggm8=; b=Se/BhyFDR/Tt2UKhI/1V WilUCVSqzBKzkzz9NnS2ilIMti0A6ozH82GqYkZs1CfVcsDUCxKw5HGMbXukM9Vd aVo9AzIQKv5VsLMPUmADutz8L1a6/owfuSeKvhESLKxzZUMoYFySj2PZQGsWVoZs r/uKGaADCWxMmA0CY/WKj4w= Received: (qmail 38945 invoked by alias); 13 Feb 2018 10:24:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 38895 invoked by uid 89); 13 Feb 2018 10:24:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Feb 2018 10:24:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9C4E880D; Tue, 13 Feb 2018 02:24:22 -0800 (PST) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BFC3C3F53D; Tue, 13 Feb 2018 02:24:21 -0800 (PST) To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, GCC/ARM] Multilib mapping for Armv8-R Message-ID: <333ec2c7-72e5-3ca7-1b1b-e99e45bfd9d6@foss.arm.com> Date: Tue, 13 Feb 2018 10:24:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, Due to there being no multilib mapping for Armv8-R, default multilib targeting -march=armv4t with softfloat floating-point arithmetic is being used. This patch maps it instead to the existing Armv7 multilibs. Note that since there is no single-precision multilib compatible with R profile, -march=armv8-r+fp.sp is mapped to -march=armv7 ie. Armv7 with softfloat floating-point. Changelog entry is as follows: *** gcc/ChangeLog *** 2018-02-12 Thomas Preud'homme * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs. Testing: Ran -print-multi-directory for all combinations of extensions one can pass to -march=armv8-r (including no extension but only considering a single ordering of extension). All gave the expected result. Details in appendix. Is this ok for stage4? Best regards, Thomas Appendix: output of -print-multi-directory for all extensions available to -march=armv8-r % for ext in "" +crc +fp.sp +simd +crypto +crc+fp.sp +crc+simd +crc+crypto +fp.sp+simd +fp.sp+crypto +simd+crypto +crc+fp.sp+simd +crc+fp.sp+crypto +crc+simd+crypto +fp.sp+simd+crypto +crc+fp.sp+simd+crypto ; do cmd="arm-none-eabi-gcc -march=armv8-r${ext} -mfloat-abi=soft -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done arm-none-eabi-gcc -march=armv8-r -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+fp.sp -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+simd -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+simd -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+fp.sp+simd -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+fp.sp+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+simd+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+simd+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+fp.sp+simd+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd+crypto -mfloat-abi=soft -print-multi-directory: thumb/v7/nofp % for ext in "" +crc +fp.sp +simd +crypto +crc+fp.sp +crc+simd +crc+crypto +fp.sp+simd +fp.sp+crypto +simd+crypto +crc+fp.sp+simd +crc+fp.sp+crypto +crc+simd+crypto +fp.sp+simd+crypto +crc+fp.sp+simd+crypto ; do cmd="arm-none-eabi-gcc -march=armv8-r${ext} -mfloat-abi=softfp -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done arm-none-eabi-gcc -march=armv8-r -mfloat-abi=softfp -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc -mfloat-abi=softfp -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+fp.sp -mfloat-abi=softfp -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+simd -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp -mfloat-abi=softfp -print-multi-directory: thumb/v7/nofp arm-none-eabi-gcc -march=armv8-r+crc+simd -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+fp.sp+simd -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+fp.sp+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+simd+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+simd+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+fp.sp+simd+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd+crypto -mfloat-abi=softfp -print-multi-directory: thumb/v7+fp/softfp % for ext in "" +crc +fp.sp +simd +crypto +crc+fp.sp +crc+simd +crc+crypto +fp.sp+simd +fp.sp+crypto +simd+crypto +crc+fp.sp+simd +crc+fp.sp+crypto +crc+simd+crypto +fp.sp+simd+crypto +crc+fp.sp+simd+crypto ; do cmd="arm-none-eabi-gcc -march=armv8-r${ext} -mfloat-abi=hard -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done arm-none-eabi-gcc -march=armv8-r -mfloat-abi=hard -print-multi-directory: . arm-none-eabi-gcc -march=armv8-r+crc -mfloat-abi=hard -print-multi-directory: . arm-none-eabi-gcc -march=armv8-r+fp.sp -mfloat-abi=hard -print-multi-directory: . arm-none-eabi-gcc -march=armv8-r+simd -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+fp.sp -mfloat-abi=hard -print-multi-directory: . arm-none-eabi-gcc -march=armv8-r+crc+simd -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+fp.sp+simd -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+fp.sp+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+simd+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+simd+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+fp.sp+simd+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard arm-none-eabi-gcc -march=armv8-r+crc+fp.sp+simd+crypto -mfloat-abi=hard -print-multi-directory: thumb/v7+fp/hard diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib index 2f790097670e1bf81b56b069a6b1582763aab6e9..cd5927a7c9ec053b4d5b9725f7b30daeca3b1aa3 100644 --- a/gcc/config/arm/t-multilib +++ b/gcc/config/arm/t-multilib @@ -70,6 +70,7 @@ v8_a_simd_variants := $(call all_feat_combs, simd crypto) v8_1_a_simd_variants := $(call all_feat_combs, simd crypto) v8_2_a_simd_variants := $(call all_feat_combs, simd fp16 fp16fml crypto dotprod) v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto) +v8_r_nosimd_variants := $(call all_feat_combs, crc fp.sp) ifneq (,$(HAS_APROFILE)) include $(srcdir)/config/arm/t-aprofile @@ -105,6 +106,20 @@ MULTILIB_MATCHES += march?armv7+fp=march?armv7-r+fp+idiv MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \ march?armv5te+fp=march?$(ARCH)+fp) +# +# Armv8-r: map down onto common v7 code. +# Note 1: there is no single-precision armv7 multilib so +fp.sp is mapped +# down to softfloat armv7 (second MULTILIB_MATCHES). +# Note 2: +fp.sp being a subset of +simd and +crypto, there is no need to +# consider the combination of +fp.sp with a simd extension since matching +# is run after canonicalization +MULTILIB_MATCHES += march?armv7=march?armv8-r +MULTILIB_MATCHES += $(foreach ARCH, $(v8_r_nosimd_variants), \ + march?armv7=march?armv8-r$(ARCH)) +MULTILIB_MATCHES += $(foreach ARCH,+simd +crypto, \ + march?armv7+fp=march?armv8-r$(ARCH) \ + march?armv7+fp=march?armv8-r+crc$(ARCH)) + ifeq (,$(HAS_APROFILE)) # Map all v7-a