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