From: Richard Sandiford <rdsandiford@googlemail.com>
To: Steve Ellcey <sellcey@mips.com>
Cc: <apinski@cavium.com>, <gcc@gcc.gnu.org>
Subject: Re: GCC Mips has 31 Masks in mips.opt
Date: Tue, 28 Jan 2014 06:51:00 -0000 [thread overview]
Message-ID: <87r47thy46.fsf@talisman.default> (raw)
In-Reply-To: <1390857513.3022.136.camel@ubuntu-sellcey> (Steve Ellcey's message of "Mon, 27 Jan 2014 13:18:33 -0800")
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
prev parent reply other threads:[~2014-01-27 22:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 1:02 Steve Ellcey
2014-01-25 1:32 ` H.J. Lu
2014-01-25 21:56 ` Richard Sandiford
2014-01-27 21:50 ` Steve Ellcey
2014-01-28 6:51 ` Richard Sandiford [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r47thy46.fsf@talisman.default \
--to=rdsandiford@googlemail.com \
--cc=apinski@cavium.com \
--cc=gcc@gcc.gnu.org \
--cc=sellcey@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).