This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFT] PR19154: New AVR bit extraction patter
- From: Andrew Hutchinson <andrewhutchinson at cox dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Mar 2005 18:37:04 -0500
- Subject: Re: [RFT] PR19154: New AVR bit extraction patter
+ return (AS2 (and,%A0,%3) CR_TAB
oops I think you wanted to clear %A0 - that's not what it does.
I think you are "done for" when operand[1]=operand[0] -at least I could not see a neat work around.
How about define and split to create:
(X & n) ? 1 : 0
This will be handled by existing define insn that use sbrs/c
(Im checking to see if code is "perfect")
gcc presently will convert this in "c" to the bit extraction (same as your testcase) but
I think a define and split will keep it intact.