public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Alan Modra <amodra@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 6/6] [RS6000] inline plt call sequences
Date: Wed, 28 Nov 2018 13:39:00 -0000	[thread overview]
Message-ID: <20181128133941.GE23873@gate.crashing.org> (raw)
In-Reply-To: <20181128013401.GE13363@bubble.grove.modra.org>

On Wed, Nov 28, 2018 at 12:04:01PM +1030, Alan Modra wrote:
> On Tue, Nov 27, 2018 at 11:17:48AM -0600, Segher Boessenkool wrote:
> > That all sounds great :-)  Has this been tested with older binutils, too?
> 
> Yes, lots of times.  Sometimes by accident when I forgot to install
> a new binutils.  :-)
> 
> > > +(define_insn "*sibcall_indirect_nonlocal_sysv<mode>"
> > 
> > > +   (set (attr "length")
> > > +	(cond [(and (and (match_test "!rs6000_speculate_indirect_jumps")
> > > +			 (match_test "which_alternative != 1"))
> > > +		    (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
> > > +		  (const_string "12")
> > > +	       (ior (and (match_test "!rs6000_speculate_indirect_jumps")
> > > +			 (match_test "which_alternative != 1"))
> > > +		   (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
> > > +		  (const_string "8")]
> > > +	      (const_string "4")))])
> > 
> > Please use set_attr_alternative for these.
> 
> Are you sure about that?  The expression blows out to something like
> (completely untested):

But you don't need "cond", something with if_then_else is simpler.  And
(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))
could be put into a macro or inline or even a predicate.

Those apply to both with set_attr_alternative and without, of course;
please use what is easiest to read and understand.

(Just committing without changes is fine as well of course).

Thanks,


Segher

  reply	other threads:[~2018-11-28 13:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07  5:33 [PATCH 0/6] [RS6000] inline plt call support Alan Modra
2018-11-07  5:37 ` [PATCH 1/6] [RS6000] rs6000_output_call for external call insn assembly output Alan Modra
2018-11-08  0:09   ` Segher Boessenkool
2018-11-08 13:21     ` Alan Modra
2018-11-07  5:38 ` [PATCH 2/6] [RS6000] rs6000_output_indirect_call Alan Modra
2018-11-12 19:44   ` Bill Schmidt
2018-11-13  0:14     ` Alan Modra
2018-11-13 11:14       ` Segher Boessenkool
2018-11-13 12:48         ` [PATCH 1/6] [RS6000] rs6000_call_template for external call insn assembly output Alan Modra
2018-11-20 15:59           ` Segher Boessenkool
2018-11-13 12:49         ` [PATCH 2/6] [RS6000] rs6000_indirect_call_template Alan Modra
2018-11-20 16:23           ` Segher Boessenkool
2018-11-13 12:50         ` [PATCH 3/6] [RS6000] Replace TLSmode with P, and correct tls call mems Alan Modra
2018-11-20 17:10           ` Segher Boessenkool
2018-11-13 12:51         ` [PATCH 4/6] [RS6000] Remove constraints on call rounded_stack_size_rtx arg Alan Modra
2018-11-27 15:27           ` Segher Boessenkool
2018-11-13 12:52         ` [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls Alan Modra
2018-11-27 16:29           ` Segher Boessenkool
2018-11-28  1:07             ` Alan Modra
2018-11-28 13:33               ` Segher Boessenkool
2018-11-28 23:08                 ` Alan Modra
2018-11-29  6:11                 ` Alan Modra
2018-11-13 12:53         ` [PATCH 6/6] [RS6000] inline plt call sequences Alan Modra
2018-11-27 17:18           ` Segher Boessenkool
2018-11-28  1:34             ` Alan Modra
2018-11-28 13:39               ` Segher Boessenkool [this message]
2018-11-07  5:38 ` [PATCH 3/6] [RS6000] Replace TLSmode with P, and correct tls call mems Alan Modra
2018-11-08  1:11   ` Segher Boessenkool
2018-11-08 13:27     ` Alan Modra
2018-11-08 18:09       ` Segher Boessenkool
2018-11-07  5:39 ` [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls Alan Modra
2018-11-07  5:39 ` [PATCH 4/6] [RS6000] Remove constraints on call rounded_stack_size_rtx arg Alan Modra
2018-11-08  1:19   ` Segher Boessenkool
2018-11-07  5:40 ` [PATCH 6/6] [RS6000] inline plt call sequences Alan Modra

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=20181128133941.GE23873@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.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).