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