This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFT] PR19154: New AVR bit extraction patterns
- From: Andrew Hutchinson <andrewhutchinson at cox dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Mar 2005 17:16:15 -0500
- Subject: [RFT] PR19154: New AVR bit extraction patterns
Look neat!
+ return (AS2 (and,%A0,%3) CR_TAB
requires operands[0] to be "d" not "r" - which is unfortunate.
+ AS2 (mov,%A0,1) CR_TAB
Should be ldi %A0,1 - or even "inc %A0"
(did GAS accept that?)
Ignoring detail, I will run some tests today.
One concern is that it might get in the way of the conditional bit tests
"sbrx_branch" et al. By what mechanism is this prevented?
I have a patches I am working on that plays around with sbrx_branch so I
will be able to give it a good look over and if it squawls I should be
able to help with a workaround.
You might want to refer to "avr_out_sbxx_branch()" which deals QI/HI and
SI mode bit extraction in the if/then/else context. You can easily use
the same code to cover all of these modes for bit>=8.
I would also note that "avr_out_sbxx_branch()" assume canolization is
different between QI and other modes (AND mask v EXTRACT bit) I dont
know if that is relevant here but if you can elaborate on that it might
be useful for future reference (ie do we need still patterns to cover
both - as that prevents use of mode macros)
I note that the HImode version is little more than a zero extension. I
assume gcc was not smart enough to use qi pattern and add extention?
(may be I dont need an answer to that!)
BTW
you also need (set_attr "cc" "clobber")