On 16/10/17 10:27, Thomas Preudhomme wrote:
> 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  <thomas.preudho...@arm.com>
> 
>     * 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?
> 

OK.

R.

> Best regards,
> 
> Thomas
> 
> allow_cortex_m33_nodsp.patch
> 
> 
> 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},
> 

Reply via email to