[Patch, AVR]: QI builtins for parity, popcount, 1<< n

Georg-Johann Lay avr@gjlay.de
Fri Jun 17 19:14:00 GMT 2011


Georg-Johann Lay schrieb:

> To come back to the original topic, here is a tentative patch for
> better popcount and parity:
> 
> 	* config/avr/t-avr (LIB1ASMFUNCS): Rename _loop_ffsqi2 to
> 	_ffsqi2_nz.
> 	* confif/avr/libgcc.S: Ditto. Rename __loop_ffsqi2 to __ffsqi2_nz.
> 	(__ctzsi2, __ctzhi2): Map zero to 255.
> 	(__popcounthi2): Use r27 instead of r30.
> 	(__popcountdi2): Use r30 instead of r27.
> 	* config/avr/avr.md (parityhi2): New expander.
> 	(popcounthi2): New expander.
> 	(popcountsi2): New expander.
> 	(*parityhi2.libgcc): New insn.
> 	(*parityqihi2.libgcc): New insn.
> 	(*popcounthi2.libgcc): New insn.
> 	(*popcountsi2.libgcc): New insn.
> 	(*popcountqi2.libgcc): New insn.
> 	(*popcountqihi2.libgcc): New insn_and_split.
> 
> Johann

Oops, picked the wrong file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: popcount.diff
Type: text/x-patch
Size: 5584 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110617/ede8b029/attachment.bin>


More information about the Gcc-patches mailing list