This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [again] switch() statements on ARM/Thumb
- From: Lars Brinkhoff <lars dot spam at nocrew dot org>
- To: Richard dot Earnshaw at arm dot com
- Cc: Adrian von Bidder <avbidder at acter dot ch>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 09 Jan 2002 13:47:07 +0100
- Subject: Re: [again] switch() statements on ARM/Thumb
- Organization: nocrew
- References: <200201091204.MAA14599@cam-mail2.cambridge.arm.com>
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