From patchwork Mon Oct 16 09:27:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 826202 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-464245-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="K6PcYF2/"; 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 3yFtJq5Wsrz9rvt for ; Mon, 16 Oct 2017 20:27:33 +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=bf5D64lOk/F1oSWPChzSE9zCneKoIagNsbsPTSw2FKUJQ4wqQm o35WIVxE9WDBmGj+eUaQC8xekS7xfi1lO/L20kcxLhdyn+1zt4zAUvtUzamBQzz1 UHkh/dacKaDyaOhJ/VLX4tnlpzNs0bShL563rBe/vob8qdH1bl/D8xXFo= 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=no7IhIAGlZf092KZY/we1u+r/8o=; b=K6PcYF2/4zDVeXwAo12B RBQhP4TutCVHwZnTLtcgXT8G73Iv22g78bJju2KDdz45M8HrThBtKM0IUe4+TnTp CghQznKA2R+jazCsP3RzhGDGl6E3E1otYSg1b+lxQ7bR3t31UBm0suMb3WDLHCfT EiYgjtbizsqIOgVJ0m83D6A= Received: (qmail 68714 invoked by alias); 16 Oct 2017 09:27:26 -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 68702 invoked by uid 89); 16 Oct 2017 09:27:25 -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, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HX-Envelope-From:sk:thomas., dsp, DSP, sk:thomas. X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Oct 2017 09:27:24 +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 693B7F; Mon, 16 Oct 2017 02:27:22 -0700 (PDT) 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 9A3433F483; Mon, 16 Oct 2017 02:27:21 -0700 (PDT) To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, GCC/ARM] Allow +nodsp for -mcpu=cortex-m33 Message-ID: Date: Mon, 16 Oct 2017 10:27:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi, DSP instructions are optional for Arm Cortex-M33, yet its -mcpu option does not allow +nodsp. Users are thus left with using -march=armv8-m.main -mtune=cortex-m33. This patch allows +nodsp to -mcpu=cortex-m33. ChangeLog entry is as follows: *** gcc/ChangeLog *** 2017-10-11 Thomas Preud'homme * config/arm/arm-cpus.in (cortex-m33): Add nodsp option. * doc/invoke.texi: Document +nodsp as a valid extension for -mcpu=cortex-m33. Tested by building an arm-none-eabi GCC cross-compiler and checking that __ARM_FEATURE_DSP is *not* defined when invoked with -mcpu=cortex-m33+nodsp. Is this ok for trunk? Best regards, Thomas diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in index 07de4c9375ba7a0df0d8bd00385e54a4042e5264..25fc429a8338e433b9fcd0ee385ff127423494c2 100644 --- a/gcc/config/arm/arm-cpus.in +++ b/gcc/config/arm/arm-cpus.in @@ -1516,6 +1516,7 @@ begin cpu cortex-m33 architecture armv8-m.main+dsp fpu fpv5-sp-d16 option nofp remove ALL_FP + option nodsp remove armv7em costs v7m end cpu cortex-m33 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9ad1fb339babe2ce8f45ecac2fa93d7b9ae5fd30..722d5cc2c0a020906e6df3260822cdd268245082 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -15803,6 +15803,9 @@ Permissible names for this option are the same as those for The following extension options are common to the listed CPUs: @table @samp +@item +nodsp +Disable the DSP instructions on @samp{cortex-m33}. + @item +nofp Disables the floating-point instructions on @samp{arm9e}, @samp{arm946e-s}, @samp{arm966e-s}, @samp{arm968e-s}, @samp{arm10e},