public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Schmidt <bschmidt@redhat.com>
To: Julian Brown <julian@codesourcery.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH/RFC/RFA] Machine modes for address printing (all targets)
Date: Thu, 05 Nov 2015 10:22:00 -0000	[thread overview]
Message-ID: <563B2DCC.1000108@redhat.com> (raw)
In-Reply-To: <20151104125418.5b15143a@octopus>

On 11/04/2015 01:54 PM, Julian Brown wrote:
> That's not all targets by any means, but may be enough to warrant a
> change in the interface. I propose that:
>
> * The output_address function should have a machine_mode argument
>    added. Bare addresses (e.g. the 'a' case in final.c) should pass
>    "VOIDmode" for this argument.
>
> * Other callers of output_address -- actually all in backends -- can
>    pass the machine mode for the memory access in question.
>
> * The TARGET_PRINT_OPERAND_ADDRESS hook shall also have a machine_mode
>    argument added. The legacy PRINT_OPERAND_ADDRESS hook can be left
>    alone. (The documentation for the operand-printing hooks needs fixing
>    too, incidentally.)

I think this approach seems fine.

>  static void
> -mcore_print_operand_address (FILE * stream, rtx x)
> +mcore_print_operand_address (FILE * stream, machine_mode mode ATTRIBUTE_UNUSED,
> +			     rtx x)

So apparently we're settling on writing the unused arg as just 
"machine_mode" without a name. Please change everywhere.

> @@ -1754,7 +1754,7 @@ mmix_print_operand_punct_valid_p (unsign
>  /* TARGET_PRINT_OPERAND_ADDRESS.  */
>
>  static void
> -mmix_print_operand_address (FILE *stream, rtx x)
> +mmix_print_operand_address (FILE *stream, machine_mode mode, rtx x)
>  {
>    if (REG_P (x))
>      {

The arg appears to be unused - I'd expect to see a warning here.

Other thank that it looks OK. I'm not going to require that you test 
every target, but it would be good to have the full set built to cc1 
before and after, and please be on the lookout for fallout.


Bernd

  reply	other threads:[~2015-11-05 10:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 12:54 Julian Brown
2015-11-05 10:22 ` Bernd Schmidt [this message]
2015-11-09 11:25   ` Julian Brown
2015-11-10  1:04     ` Joseph Myers

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=563B2DCC.1000108@redhat.com \
    --to=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=julian@codesourcery.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).