This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AVR: take 3: implement HI/SI logic operations and sign/zero extension by define_insn_and_split
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Björn Haase <bjoern dot m dot haase at web dot de>
- Cc: Denis Chertykov <denisc at overta dot ru>, Andy Hutchinson <HutchinsonAndy at netscape dot net>, marekm at amelek dot gda dot pl, gcc-patches at gcc dot gnu dot org
- Date: Sat, 07 May 2005 14:42:31 +0100
- Subject: Re: [PATCH] AVR: take 3: implement HI/SI logic operations and sign/zero extension by define_insn_and_split
- References: <200504032154.35580.bjoern.m.haase@web.de><200504171118.08169.bjoern.m.haase@web.de><sm1plgsx.fsf@localhost.localdomain><200505060100.15762.bjoern.m.haase@web.de>
Björn Haase <bjoern.m.haase@web.de> writes:
> + "reload_completed
> + && ((GET_CODE (operands[2]) == CONST_INT) || REG_P (operands[2]))"
> + [(set (subreg:QI (match_dup 0) 0)
> + (and:QI (subreg:QI (match_dup 1) 0)
> + (subreg:QI (match_dup 2) 0)))
> + (set (subreg:QI (match_dup 0) 1)
> + (and:QI (subreg:QI (match_dup 1) 1)
> + (subreg:QI (match_dup 2) 1)))]
This is just to invite comments from others really, but FWIW: I don't
think this is right. You shouldn't have subregs of hard registers.
The splitter should be generating (reg:QI ...)s instead.
Richard