Hi! On Mon, Jun 22, 2020 at 08:59:48PM +0100, Richard Sandiford wrote: > "Kewen.Lin" <li...@linux.ibm.com> writes: > > @@ -5167,6 +5167,24 @@ mode @var{n}. > > > > This pattern is not allowed to @code{FAIL}. > > > > +@cindex @code{lenload@var{m}} instruction pattern > > +@item @samp{lenload@var{m}} > > +Perform a vector load with length from memory operand 1 of mode @var{m} > > +into register operand 0. Length is provided in register operand 2 with > > +appropriate mode which should afford the maximal required precision of > > +any available lengths. > > I think we need to say in more detail what “load with length” actually > means. How about: > > Load the number of bytes specified by operand 2 from memory operand 1 > into register operand 0, setting the other bytes of operand 0 to > undefined values. Operands 0 and 1 have mode @var{m}. Operand 2 has > whichever integer mode the target prefers.
The Power instructions set the other bytes to 0. There is no great way to zero them out with other insns either, so lenloadM should do it, from our viewpoint. (The problem case is when the length is not constant). > > +@cindex @code{lenstore@var{m}} instruction pattern > > +@item @samp{lenstore@var{m}} > > +Perform a vector store with length from register operand 1 of mode @var{m} > > +into memory operand 0. Length is provided in register operand 2 with > > +appropriate mode which should afford the maximal required precision of > > +any available lengths. > > Similarly here: > > Store the number of bytes specified by operand 2 from nonmemory operand 1 > into memory operand 0, leaving the other bytes of operand 0 unchanged. > Operands 0 and 1 have mode @var{m}. Operand 2 has whichever integer > mode the target prefers. That is what our insns do, yes, so that is fine with me :-) > Sorry, I should have picked up on this last time, but I think we should > be consistent about whether there's an underscore after “len” or not. > I realise this is just replicating what happens for IFN_MASK_LOAD/ > “maskload” and IFN_MASK_STORE/“maskstore”, but it's something I kept > tripping over when implementing those for SVE. > > Personally I think it is easier to read with the underscore, so this > would be “len_load_optab” and “len_load$a” (or “len_load_$a”, > there's no real consistency on that). Same for stores. With a second underscore is better readable than with just one (the mode does not apply to just the part after the underscore). Thanks, Segher