public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "augustine.sterling@gmail.com" <augustine.sterling@gmail.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
		"linux-xtensa@linux-xtensa.org" <linux-xtensa@linux-xtensa.org>
Subject: Re: [RFC 2/5] gcc: xtensa: make configuration dynamic
Date: Thu, 25 May 2017 18:25:00 -0000	[thread overview]
Message-ID: <CAGSvup9PA-L2GCPo0bL3Yk1-g3E76WDSZgd9XAxnZRzWT-bPzA@mail.gmail.com> (raw)
In-Reply-To: <1495487362-18969-3-git-send-email-jcmvbkbc@gmail.com>

On Mon, May 22, 2017 at 2:09 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Now that XCHAL_* macros don't have to be preprocessor constants add
> include/xtensa-dynconfig.h that defines them as fields of a structure
> returned from the xtensa_get_config function.
> Define that structure and fill it with default parameter values
> specified in the include/xtensa-config.h.
> Define reusable function xtensa_load_config that tries to load
> configuration and return an address of an exported object from it.
> Define the function xtensa_get_config that uses xtensa_load_config to
> get structure xtensa_config, either dynamically configured or the
> default.
>
> 2017-05-22  Max Filippov  <jcmvbkbc@gmail.com>
> gcc/
>         * Makefile.in (PLUGIN_HEADERS): Add include/xtensa-dynconfig.h.
>         * config.gcc (xtensa*-*-*): Add xtensa-config.o to extra_objs.
>         * gcc/config/xtensa/t-xtensa (xtensa-config.o): New rule.
>         * gcc/config/xtensa/xtensa-config.c: New file.
>         * gcc/config/xtensa/xtensa.h (xtensa-config.h): Replace #include
>         with xtensa-dynconfig.h
>         (XCHAL_HAVE_MUL32_HIGH, XCHAL_HAVE_RELEASE_SYNC,
>          XCHAL_HAVE_S32C1I, XCHAL_HAVE_THREADPTR,
>          XCHAL_HAVE_FP_POSTINC): Drop definitions.

This almost certainly should go through the normal gcc plugin
mechanism instead of the hand-rolled one you have here.

https://gcc.gnu.org/onlinedocs/gccint/Plugins.html#Plugins

If there is a reason it can't (and I'm not sufficiently familiar with
the issues here), then you need to ensure that the various protections
enforced by the normal plugin mechanism is used--and someone more
knowledgeable than me needs to review it.

Please note that by using a plugin mechanism, there are licensing
issues that come into play, that are different from the usual
licensing issues. I would be absolutely sure that you all are OK with
how the runtime exception applies to this new situation.

  reply	other threads:[~2017-05-25 18:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 21:09 [RFC 0/5] xtensa: support dynamic configuration Max Filippov
2017-05-22 21:09 ` [RFC 4/5] gcc: xtensa: add __XCHAL_* builtins Max Filippov
2017-05-22 21:09 ` [RFC 5/5] libgcc: xtensa: use built-in configuration Max Filippov
2017-05-22 21:09 ` [RFC 3/5] gcc: xtensa: support dynconfig on windows Max Filippov
2017-05-22 21:09 ` [RFC 2/5] gcc: xtensa: make configuration dynamic Max Filippov
2017-05-25 18:25   ` augustine.sterling [this message]
2017-05-25 20:57     ` Max Filippov
2017-05-26 15:04       ` Ian Lance Taylor via gcc-patches
2017-05-26 18:48         ` Max Filippov
2017-05-22 21:31 ` [RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant Max Filippov
2017-05-22 21:49   ` augustine.sterling
2017-05-23  2:19     ` Max Filippov
2017-05-25 18:24   ` augustine.sterling
2017-06-14 17:23     ` Max Filippov

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=CAGSvup9PA-L2GCPo0bL3Yk1-g3E76WDSZgd9XAxnZRzWT-bPzA@mail.gmail.com \
    --to=augustine.sterling@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-xtensa@linux-xtensa.org \
    /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).