This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Mips has 31 Masks in mips.opt
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: <apinski at cavium dot com>, <gcc at gcc dot gnu dot org>
- Date: Mon, 27 Jan 2014 22:13:29 +0000
- Subject: Re: GCC Mips has 31 Masks in mips.opt
- Authentication-results: sourceware.org; auth=none
- References: <08ead5c2-5777-4f50-a607-e63202286db6 at BAMAIL02 dot ba dot imgtec dot org> <87sisb4x7n dot fsf at talisman dot default> <1390857513 dot 3022 dot 136 dot camel at ubuntu-sellcey>
Steve Ellcey <sellcey@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