This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, AVR]: Fix PR33049 (implement extzv)
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Anatoly Sokolov <aesok at post dot ru>, "Eric B. Weddington" <eric dot weddington at atmel dot com>
- Date: Tue, 21 Jun 2011 11:08:33 +0400
- Subject: Re: [Patch, AVR]: Fix PR33049 (implement extzv)
- References: <4DFF88C7.3080809@gjlay.de>
2011/6/20 Georg-Johann Lay <avr@gjlay.de>:
> This is an optimization patch that implements extzv for 1-bit extracts.
> +(define_insn_and_split "*extzv"
> + [(set (match_operand:QI 0 "register_operand" "=*d,*d,*d,r")
> + (zero_extract:QI (match_operand:QI 1 "register_operand" "0,r,0,r")
> + (const_int 1)
> + (match_operand:QI 2 "const_0_to_7_operand" "L,L,P,n")))]
> + ""
> + "@
> + andi %0,1
> + mov %0,%1\;andi %0,1
> + lsr %0\;andi %0,1
> + bst %1,%2\;clr %0\;bld %0,0"
Why you have a second constraint alternative (*d,r,L) ?
IMHO it's unnecessary.
> + && REGNO (operands[0]) >= 16"
It's not a good practice to refer to register as number.
Denis.