Il 03/05/2012 17:10, Richard Henderson ha scritto: >>> >>> >>> ... except that no target sets the macros to 2, and all of them could >>> (as far as I could see). Looks like the code trumps the documentation; >>> how does this look? > > "No target sets to 2"? You mean like mips? You forgot to look at the > corresponding CLZ_DEFINED_VALUE_AT_ZERO.
Yes, I missed that. > I'll admit I hadn't been paying attention when sandra added the patch > in question though... > >>> * optabs.c (expand_ffs): Check CTZ_DEFINED_VALUE_AT_ZERO >>> against 1. >>> * doc/tm.texi (Misc): Invert meaning of 1 and 2 for >>> CLZ_DEFINED_VALUE_AT_ZERO and CTZ_DEFINED_VALUE_AT_ZERO. > > So... no, I don't think this is a good idea. Yeah, not as I posted... of course config/mips/mips.h needs change, but do you disagree that all targets _do_ have the same value at zero for the optab as they have for RTL? Paolo