public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <jimw@sifive.com>
To: Maxim Blinov <maxim.blinov@embecosm.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: gcc/config/arch/arch.opt: Option mask gen problem
Date: Mon, 22 Jul 2019 18:54:00 -0000	[thread overview]
Message-ID: <CAFyWVab8hTVMqTgLcWfPVBL9HP0QmVKgE10m2+oLA_yx0Un-GA@mail.gmail.com> (raw)
In-Reply-To: <CADmoyEimubE3tWR4Z9jcvNrNutV1rT7dyDLnYs4=_8sdE4TUEA@mail.gmail.com>

On Mon, Jul 22, 2019 at 4:05 AM Maxim Blinov <maxim.blinov@embecosm.com> wrote:
> Is it possible, in the arch.opt file, to have GCC generate a bitmask
> relative to a user-defined variable without an associated name? To
> illustrate my problem, consider the following option file snippet:
> ...
> But, I don't want the user to be able to pass "-mbmi-zbb" or
> "-mno-bmi-zbb" on the command line:

If you don't want an option, why are you making changes to the
riscv.opt file?  This is specifically for supporting command line
options.

Adding a variable here does mean that it will automatically be saved
and restored, and I can see the advantage of doing that, even if it is
only indirectly tied to options.  You could add a variable here, and
then manually define the bitmasks yourself in riscv-opt.h or riscv.h.
Or you could just add the variable to the machine_function struct in
riscv.c, which will also automatically save and restore the variable.

Jim

      reply	other threads:[~2019-07-22 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 11:05 Maxim Blinov
2019-07-22 18:54 ` Jim Wilson [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=CAFyWVab8hTVMqTgLcWfPVBL9HP0QmVKgE10m2+oLA_yx0Un-GA@mail.gmail.com \
    --to=jimw@sifive.com \
    --cc=gcc@gcc.gnu.org \
    --cc=maxim.blinov@embecosm.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).