> Date: Sat, 14 Mar 2009 13:07:04 +0100 > From: Paolo Bonzini <bonz...@gnu.org>
> Hans-Peter Nilsson wrote: > >> Date: Fri, 13 Mar 2009 12:34:49 +0100 > >> From: Paolo Bonzini <bonz...@gnu.org> > > > >> I would like to know whether for avr,bfin,cris,frv,h8300,pdp11,rs6000 > >> (which define SHIFT_COUNT_TRUNCATED as 0) and for mcore,sh,vax (which > >> do not define it at all) it is right that shift counts are never > >> truncated. > > > > The answer to the question is "no", but I'd guess the more > > useful answer is "yes", for different definitions of "truncate". FWIW, the bit-test-instruction "btst" truncates the count in the register operand to 5 (five) bits. Not that it'd count as a *shift*, but perhaps as a bitfield insn; it's modelled as a bitfield test. > Ok, after my patches you will be able to teach GCC about this definition > of truncate. (I presume you mean truncating to 6 instead of 5 bits.) Hm, I see @deftypefn {Target Hook} int TARGET_SHIFT_TRUNCATION_MASK in tm.texi which says I *should* be able to do that already, but its usage in gcc seems quite limited. brgds, H-P