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: [again] switch() statements on ARM/Thumb


Richard Earnshaw <rearnsha@arm.com> writes:
> > > +(define_insn "*thumb_subsi3imm_insn"
> > > +  [(set (match_operand:SI           0 "register_operand" "=l,l")
> > > +	(minus:SI (match_operand:SI 1 "register_operand" "l,0")
> > > +		  (match_operand:SI 2 "const_int_operand" "L,I")))]
> > This should be merged with the existing thumb_subsi3_insn pattern.
> Such a construction should be canonicalized as a PLUS of the negated
> constant, which the existing thumb_addsi3 pattern already covers.
> So where is this MINUS expression coming from?

>From these?

> +      emit_insn (gen_thumbpic_casesi (operands[0], operands[1],
> +              operands[2], operands[3], operands[4]));

> +(define_expand "thumbpic_casesi"
> +  [(set (match_dup 5)
> +        (minus:SI (match_operand:SI 0 "" "")
> +                  (match_operand:SI 1 "" "")))


-- 
Lars Brinkhoff          http://lars.nocrew.org/     Linux, GCC, PDP-10
Brinkhoff Consulting    http://www.brinkhoff.se/    programming


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