diff mbox

MIPS: Infer dspr2 for the 74k

Message ID 4C77BFD3.2020805@codesourcery.com
State New
Headers show

Commit Message

Catherine Moore Aug. 27, 2010, 1:38 p.m. UTC
This patch changes the default DSP setting for the 74K to DSPR2.  Does 
this look okay to install?

Thanks,
Catherine

2010-08-27  Catherine Moore  <clm@codesourcery.com>

         * config/mips/mips.h (BASE_DRIVER_SELF_SPECS):
         Infer -mdspr2 for the the 74K.

Comments

Maciej W. Rozycki Aug. 27, 2010, 5:16 p.m. UTC | #1
On Fri, 27 Aug 2010, Catherine Moore wrote:

> This patch changes the default DSP setting for the 74K to DSPR2.  Does this
> look okay to install?
[...]
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h  (revision 163517)
+++ config/mips/mips.h  (working copy)
> @@ -761,7 +761,8 @@ enum mips_code_readable_setting {
> 
>  /* A spec that infers the -mdsp setting from an -march argument.  */
>  #define BASE_DRIVER_SELF_SPECS \
> -  "%{!mno-dsp:%{march=24ke*|march=34k*|march=74k*|march=1004k*: -mdsp}}"
> +  "%{!mno-dsp:%{march=24ke*|march=34k*|march=1004k*: -mdsp}} \
> +   %{!mno-dspr2:%{march=74k*: -mdspr2}}"
> 
>  #define DRIVER_SELF_SPECS BASE_DRIVER_SELF_SPECS
> 

 Hmm, shouldn't this be something like:

+   %{!mno-dsp:%{march=74k*:%{!mno-dspr2: -mdspr2; -mdsp}}}"

(you may need to merge the two specs)?  The DSPr2 ASE is a strict superset 
of the DSP ASE.

  Maciej
Richard Sandiford Aug. 28, 2010, 8:23 a.m. UTC | #2
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> On Fri, 27 Aug 2010, Catherine Moore wrote:
>
>> This patch changes the default DSP setting for the 74K to DSPR2.  Does this
>> look okay to install?
> [...]
> Index: config/mips/mips.h
> ===================================================================
> --- config/mips/mips.h  (revision 163517)
> +++ config/mips/mips.h  (working copy)
>> @@ -761,7 +761,8 @@ enum mips_code_readable_setting {
>> 
>>  /* A spec that infers the -mdsp setting from an -march argument.  */
>>  #define BASE_DRIVER_SELF_SPECS \
>> -  "%{!mno-dsp:%{march=24ke*|march=34k*|march=74k*|march=1004k*: -mdsp}}"
>> +  "%{!mno-dsp:%{march=24ke*|march=34k*|march=1004k*: -mdsp}} \
>> +   %{!mno-dspr2:%{march=74k*: -mdspr2}}"
>> 
>>  #define DRIVER_SELF_SPECS BASE_DRIVER_SELF_SPECS
>> 
>
>  Hmm, shouldn't this be something like:
>
> +   %{!mno-dsp:%{march=74k*:%{!mno-dspr2: -mdspr2; -mdsp}}}"
>
> (you may need to merge the two specs)?  The DSPr2 ASE is a strict superset 
> of the DSP ASE.

Yeah, that's better, and simplifies to:

  "%{!mno-dsp: \
     %{march=24ke*|march=34k*|march=1004k*: -mdsp} \
     %{march=74k*:%{!mno-dspr2: -mdspr2; -mdsp}}}"

OK with that change, thanks.

Richard
diff mbox

Patch

Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h  (revision 163517)
+++ config/mips/mips.h  (working copy)
@@ -761,7 +761,8 @@  enum mips_code_readable_setting {

  /* A spec that infers the -mdsp setting from an -march argument.  */
  #define BASE_DRIVER_SELF_SPECS \
-  "%{!mno-dsp:%{march=24ke*|march=34k*|march=74k*|march=1004k*: -mdsp}}"
+  "%{!mno-dsp:%{march=24ke*|march=34k*|march=1004k*: -mdsp}} \
+   %{!mno-dspr2:%{march=74k*: -mdspr2}}"

  #define DRIVER_SELF_SPECS BASE_DRIVER_SELF_SPECS