This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/6] [RS6000] inline plt call sequences


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):

   (set_attr_alternative "length"
     [(cond [(and (match_test "!rs6000_speculate_indirect_jumps")
		  (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
		(const_string "12")
	     (ior (match_test "!rs6000_speculate_indirect_jumps")
		  (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
		(const_string "8")]
	   (const_string "4"))
      (cond [(match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))")
		(const_string "8")]
	   (const_string "4"))
      (cond [(and (match_test "!rs6000_speculate_indirect_jumps")
		  (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
		(const_string "12")
	     (ior (match_test "!rs6000_speculate_indirect_jumps")
		  (match_test "(INTVAL (operands[2]) & (CALL_V4_SET_FP_ARGS | CALL_V4_CLEAR_FP_ARGS))"))
		(const_string "8")]
	   (const_string "4"))])


-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]