Message ID | alpine.DEB.1.10.1407071530220.16254@tp.orcam.me.uk |
---|---|
State | Accepted |
Headers | show |
On Mon, Jul 7, 2014 at 10:33 AM, Maciej W. Rozycki <macro@codesourcery.com> wrote: >> Could you add a short comment explaining what the "0" and "1" labels >> in vec_perm[01][01]_v2si mean? > > Like this? > > Maciej > > gcc-ppc-spe-le-update.diff > Index: gcc-fsf-trunk-quilt/gcc/config/rs6000/spe.md > =================================================================== > --- gcc-fsf-trunk-quilt.orig/gcc/config/rs6000/spe.md 2014-07-07 15:27:54.258937029 +0100 > +++ gcc-fsf-trunk-quilt/gcc/config/rs6000/spe.md 2014-07-07 15:26:43.748937008 +0100 > @@ -438,6 +438,11 @@ > [(set_attr "type" "vecload") > (set_attr "length" "4")]) > > +;; Integer vector permutation instructions. The pairs of digits in the > +;; names of these instructions indicate the indices, in the memory vector > +;; element ordering, of the vector elements permuted to the output vector > +;; from the first and the second input vector respectively. Yes, that's good. It helps if someone reading the code doesn't need to reverse engineer the numbering convention of the name. Thanks, David
On Mon, 7 Jul 2014, David Edelsohn wrote: > Yes, that's good. It helps if someone reading the code doesn't need to > reverse engineer the numbering convention of the name. Sure, I haven't questioned your request. Thanks for your review, applied now. Maciej
Index: gcc-fsf-trunk-quilt/gcc/config/rs6000/spe.md =================================================================== --- gcc-fsf-trunk-quilt.orig/gcc/config/rs6000/spe.md 2014-07-07 15:27:54.258937029 +0100 +++ gcc-fsf-trunk-quilt/gcc/config/rs6000/spe.md 2014-07-07 15:26:43.748937008 +0100 @@ -438,6 +438,11 @@ [(set_attr "type" "vecload") (set_attr "length" "4")]) +;; Integer vector permutation instructions. The pairs of digits in the +;; names of these instructions indicate the indices, in the memory vector +;; element ordering, of the vector elements permuted to the output vector +;; from the first and the second input vector respectively. + (define_insn "vec_perm00_v2si" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") (vec_select:V2SI @@ -571,6 +576,8 @@ DONE; }) +;; End of integer vector permutation instructions. + (define_insn "spe_evnand" [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r") (not:V2SI (and:V2SI (match_operand:V2SI 1 "gpc_reg_operand" "r")