On Fri, 2011-05-06 at 11:35 +0100, Richard Sandiford wrote: > Richard Earnshaw <rearn...@arm.com> writes: > >> +/* Implements target hook array_mode_supported_p. */ > >> + > >> +static bool > >> +arm_array_mode_supported_p (enum machine_mode mode, > >> + unsigned HOST_WIDE_INT nelems) > >> +{ > >> + if (TARGET_NEON > >> + && (VALID_NEON_DREG_MODE (mode) || VALID_NEON_QREG_MODE (mode)) > >> + && (nelems >= 2 && nelems <= 4)) > >> + return true; > >> + > >> + return false; > >> +} > > > > I'm not sure I understand why this is limited to 4 or fewer elements. A > > Q reg of chars would surely be 16 elements. > > The mode here is the mode of the array element, which for the cases > we're interested in would be something like V4HI (D) or V4SI (Q). > nelems says how many of those (in our case, vector) elements there > are in the array. > > The element range we want is 1-4 because that matches the number > of vectors that can be loaded by the vld1-vld4 instructions. > We don't include 1 because arrays of one element are already > treated as having the same mode as their element. > > Richard
I understand now... Ok. R. >