public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Bill Schmidt <wschmidt@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] rs6000: Add undocumented switch -mprefixed-addr
Date: Wed, 29 May 2019 13:21:00 -0000	[thread overview]
Message-ID: <20190529131629.GP31586@gate.crashing.org> (raw)
In-Reply-To: <78d1bd8d-bdaf-bb90-4e71-b8e3b9746cdf@linux.ibm.com>

Hi!

On Wed, May 29, 2019 at 07:42:38AM -0500, Bill Schmidt wrote:
> 	* rs6000-cpus.def (OTHER_FUSION_MASKS): New #define.
> 	(ISA_FUTURE_MASKS_SERVER): Add OPTION_MASK_PREFIXED_ADDR. Mask off
> 	OTHER_FUSION_MASKS.

Two spaces after a full stop (here and later again).

> +/* ISA masks setting fusion options.  */
> +#define OTHER_FUSION_MASKS	(OPTION_MASK_P8_FUSION			\
> +				 | OPTION_MASK_P8_FUSION_SIGN)

Or merge the two masks into one?

>  /* Support for a future processor's features.  */
> -#define ISA_FUTURE_MASKS_SERVER	(ISA_3_0_MASKS_SERVER			\
> -				 | OPTION_MASK_FUTURE			\
> -				 | OPTION_MASK_PCREL)
> +#define ISA_FUTURE_MASKS_SERVER	((ISA_3_0_MASKS_SERVER			\
> +				  | OPTION_MASK_FUTURE			\
> +				  | OPTION_MASK_PCREL			\
> +				  | OPTION_MASK_PREFIXED_ADDR)		\
> +				 & ~OTHER_FUSION_MASKS)

OTHER_FUSION_MASKS shouldn't be part of ISA_3_0_MASKS_SERVER.  Fix that
instead?  Fusion is a property of specific CPUs, not of ISA versions.

> -  /* -mpcrel requires the prefixed load/store support on FUTURE systems.  */
> -  if (!TARGET_FUTURE && TARGET_PCREL)
> +  /* -mprefixed-addr and -mpcrel require the prefixed load/store support on
> +     FUTURE systems.  */
> +  if (!TARGET_FUTURE && (TARGET_PCREL || TARGET_PREFIXED_ADDR))
>      {
>        if ((rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0)
>  	error ("%qs requires %qs", "-mpcrel", "-mcpu=future");

PCREL requires PREFIXED_ADDR, please simplify.

> +  if (TARGET_PCREL && !TARGET_PREFIXED_ADDR)
> +    {
> +      if ((rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0)
> +	error ("%qs requires %qs", "-mpcrel", "-mprefixed-addr");
> +
>        rs6000_isa_flags &= ~OPTION_MASK_PCREL;
>      }

Maybe put this test first, if that makes things easier or more logical?

> @@ -36379,6 +36391,7 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] =
>    { "power9-vector",		OPTION_MASK_P9_VECTOR,		false, true  },
>    { "powerpc-gfxopt",		OPTION_MASK_PPC_GFXOPT,		false, true  },
>    { "powerpc-gpopt",		OPTION_MASK_PPC_GPOPT,		false, true  },
> +  { "prefixed-addr",		OPTION_MASK_PREFIXED_ADDR,	false, true  },

Do we want this?  Why?


Segher

  reply	other threads:[~2019-05-29 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 12:53 Bill Schmidt
2019-05-29 13:21 ` Segher Boessenkool [this message]
2019-05-29 21:25   ` Bill Schmidt
2019-05-29 22:00     ` Segher Boessenkool
2019-05-30  0:57       ` [PATCH v2] " Bill Schmidt
2019-05-30 15:14         ` Segher Boessenkool
2019-05-30 16:16     ` [PATCH] " Michael Meissner
2019-06-02 23:01       ` Segher Boessenkool

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=20190529131629.GP31586@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wschmidt@linux.ibm.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).