Steve Ellcey <sell...@mips.com> writes:
> On Sat, 2014-01-25 at 20:34 +0000, Richard Sandiford wrote:
>
>> Yeah, I've been trying to use separate variables for new flags.
>> That's why a lot of the MIPS options have discrete TARGET_… variables
>> (defined via Var(TARGET_…)).  target_flags should only really be needed
>> for options whose defaults are controlled by config.gcc.
>
> I guess I could probably have done that for my experiments, but I didn't
> think of using Var's instead of Mask's for some reason.  It's probably
> a good idea to free up some space anyway.
>
>> E.g. from a quick look, -mdsp, -mdspr2, -mfp-exceptions,
>> -mfused-madd and -mips3d don't need to be masks and could easily
>> be converted to Var(TARGET_…).  That's pre-approved it works.
>> Others could be moved too with a bit more effort, but hopefully
>> those 5 will be enough for now.
>
> I think it would be enough for now.  Here is the patch I came up with
> and tested.  I had to tweak a couple of things in
> gcc/common/config/mips/mips-common.c so I wouldn't mind if you took a
> look at it before I checked it in.  Testing looked all right once I
> initialized TARGET_FP_EXCEPTIONS and TARGET_FUSED_MADD to 1.

Looks good, although:

> @@ -17084,9 +17084,9 @@ mips_option_override (void)
>        mips_r10k_cache_barrier = R10K_CACHE_BARRIER_NONE;
>      }
>  
> -  /* If TARGET_DSPR2, enable MASK_DSP.  */
> +  /* If TARGET_DSPR2, enable TARGET_DSP.  */
>    if (TARGET_DSPR2)
> -    target_flags |= MASK_DSP;
> +    TARGET_DSP = TARGET_DSPR2;

I'd prefer "= true" here, in case we ever use -1 as an initial "not set"
value.  No need for a full retest for that change, spot checking would be
fine IMO.

Thanks,
Richard

Reply via email to