From patchwork Tue Feb 27 14:21:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 878571 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-473932-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="T3PpyKWc"; 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 3zrLVD74NGz9rx7 for ; Wed, 28 Feb 2018 01:21:40 +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=ZAfq8oIHhfYIelrwwNxopK0KaulTpIWklR6l2iPCZeV7jUjUjE OnNOZx9k2HI9s8juxsMcxSii7tX3qjLt/sOE60C2Y+MXDYH7q+ZSLSBju0CTe731 fgwXLM5hH/I7btmBqqHBUk0H4Jpgrke4rFsHk6wpHhy1Bxx/yXHy1mkVs= 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=svIHfuTAJTtLMTxvNOA5TLbxXW4=; b=T3PpyKWcfw9RpR1tqENx rm9ebbtxHKi779LKw+FPuMCMbx434t0uUuJa9PzJU05fTKD2HpjDQwZZ6qcUzjhU kAvbDlXOt6CUIja4Ki3R/qntNQ9adp5O2p7s9Dk+Lgt/14w3x0RyfAAvaaRDHNwf K4cRbfQmliXx1i+s3GluD2s= Received: (qmail 121776 invoked by alias); 27 Feb 2018 14:21:33 -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 121764 invoked by uid 89); 27 Feb 2018 14:21:32 -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, 27 Feb 2018 14:21:31 +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 6AAC81435 for ; Tue, 27 Feb 2018 06:21:29 -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 16F2F3F24D for ; Tue, 27 Feb 2018 06:21:28 -0800 (PST) To: "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, arm-embedded] Multilib mapping for Armv8-R Message-ID: <7b1b742f-e23f-a5d7-a927-cc963eaf959f@foss.arm.com> Date: Tue, 27 Feb 2018 14:21:27 +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, We have decided to apply the following patch to the ARM/embedded-7-branch to provide better multilib for Armv8-R targets. Due to there being no multilib mapping for Armv8-R, default multilib built for -march=armv4t with softfloat floating-point arithmetic is being used. This patch maps it instead to the existing Armv7 multilibs. Note that mapping for single-precision Armv8-R has been left out due to there being no Arm implementation of that architecture variant. Changelog entry is as follows: *** gcc/ChangeLog *** 2018-02-26 Thomas Preud'homme * config/arm/t-rmprofile: Map Armv8-R and Armv8-R with CRC extension to Armv7 multilibs. Testing: Ran -print-multi-directory for all combinations of -march=armv8-r/-march=armv8-r+crc with -mfpu=neon-fp-armv8/crypto-neon-fp-armv8. All gave the expected result. Details in appendix. Is this ok for stage4? Best regards, Thomas Appendix: output of -print-multi-directory for all supported Armv8-R configuration single precision FPU excepted. % for ext in "" +crc; 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-ar arm-none-eabi-gcc -march=armv8-r+crc -mfloat-abi=soft -print-multi-directory: thumb/v7-ar % for ext in "" +crc; do for fpu in neon-fp-armv8 crypto-neon-fp-armv8; do cmd="arm-none-eabi-gcc -march=armv8-r${ext} -mfpu=${fpu} -mfloat-abi=softfp -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done ; done arm-none-eabi-gcc -march=armv8-r -mfpu=neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -march=armv8-r -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -march=armv8-r+crc -mfpu=neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -march=armv8-r+crc -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp % for ext in "" +crc; do for fpu in neon-fp-armv8 crypto-neon-fp-armv8; do cmd="arm-none-eabi-gcc -march=armv8-r${ext} -mfpu=${fpu} -mfloat-abi=hard -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done ; done arm-none-eabi-gcc -march=armv8-r -mfpu=neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -march=armv8-r -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -march=armv8-r+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -march=armv8-r+crc -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard % for ext in "" +crc; do cmd="arm-none-eabi-gcc -mthumb -march=armv8-r${ext} -mfpu=${fpu} -mfloat-abi=soft -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done arm-none-eabi-gcc -mthumb -march=armv8-r -mfpu=crypto-neon-fp-armv8 -mfloat-abi=soft -print-multi-directory: . arm-none-eabi-gcc -mthumb -march=armv8-r+crc -mfpu=crypto-neon-fp-armv8 -mfloat-abi=soft -print-multi-directory: . % for ext in "" +crc; do for fpu in neon-fp-armv8 crypto-neon-fp-armv8; do cmd="arm-none-eabi-gcc -mthumb -march=armv8-r${ext} -mfpu=${fpu} -mfloat-abi=softfp -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done ; done arm-none-eabi-gcc -mthumb -march=armv8-r -mfpu=neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -mthumb -march=armv8-r -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -mthumb -march=armv8-r+crc -mfpu=neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp arm-none-eabi-gcc -mthumb -march=armv8-r+crc -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp -print-multi-directory: thumb/v7-ar/fpv3/softfp % for ext in "" +crc; do for fpu in neon-fp-armv8 crypto-neon-fp-armv8; do cmd="arm-none-eabi-gcc -mthumb -march=armv8-r${ext} -mfpu=${fpu} -mfloat-abi=hard -print-multi-directory" ; echo -n "$cmd: " ; eval $cmd ; done ; done arm-none-eabi-gcc -mthumb -march=armv8-r -mfpu=neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -mthumb -march=armv8-r -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -mthumb -march=armv8-r+crc -mfpu=neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard arm-none-eabi-gcc -mthumb -march=armv8-r+crc -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -print-multi-directory: thumb/v7-ar/fpv3/hard diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile index d4bc9fde4c5544812bde4743ccc18d68c1c25132..a3a24d59fb29b42a36177bd2d2ebfae4e50e5a10 100644 --- a/gcc/config/arm/t-rmprofile +++ b/gcc/config/arm/t-rmprofile @@ -135,6 +135,8 @@ MULTILIB_MATCHES += march?armv7=mcpu?xgene1 MULTILIB_MATCHES += march?armv6s-m=march?armv6-m MULTILIB_MATCHES += march?armv8-m.main=march?armv8-m.main+dsp MULTILIB_MATCHES += march?armv7=march?armv7-r +MULTILIB_MATCHES += march?armv7=march?armv8-r +MULTILIB_MATCHES += march?armv7=march?armv8-r+crc ifeq (,$(HAS_APROFILE)) MULTILIB_MATCHES += march?armv7=march?armv7-a MULTILIB_MATCHES += march?armv7=march?armv7ve @@ -162,8 +164,8 @@ MULTILIB_MATCHES += mfpu?fpv5-d16=mfpu?crypto-neon-fp-armv8 endif -# We map all requests for ARMv7-R or ARMv7-A in ARM mode to Thumb mode and -# any FPU to VFPv3-d16 if possible. +# We map all requests for ARMv7-R, ARMv7-A and ARMv8-R in ARM mode to Thumb +# mode and any FPU to VFPv3-d16 if possible. MULTILIB_REUSE += mthumb/march.armv7=march.armv7 MULTILIB_REUSE += mthumb/march.armv7/mfpu.vfpv3-d16/mfloat-abi.softfp=march.armv7/mfpu.vfpv3-d16/mfloat-abi.softfp MULTILIB_REUSE += mthumb/march.armv7/mfpu.vfpv3-d16/mfloat-abi.hard=march.armv7/mfpu.vfpv3-d16/mfloat-abi.hard