diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/c-tree.texi | 37 | ||||
-rw-r--r-- | gcc/doc/md.texi | 43 |
2 files changed, 50 insertions, 30 deletions
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi index 4bf09057124..60482e4626c 100644 --- a/gcc/doc/c-tree.texi +++ b/gcc/doc/c-tree.texi @@ -1983,7 +1983,7 @@ This macro returns the attributes on the type @var{type}. @tindex VEC_WIDEN_MULT_LO_EXPR @tindex VEC_UNPACK_HI_EXPR @tindex VEC_UNPACK_LO_EXPR -@tindex VEC_PACK_MOD_EXPR +@tindex VEC_PACK_TRUNC_EXPR @tindex VEC_PACK_SAT_EXPR @tindex VEC_EXTRACT_EVEN_EXPR @tindex VEC_EXTRACT_ODD_EXPR @@ -2837,23 +2837,30 @@ vector of @code{N/2} products. @item VEC_UNPACK_HI_EXPR @item VEC_UNPACK_LO_EXPR -These nodes represent unpacking of the high and low parts of the input vector, +These nodes represent unpacking of the high and low parts of the input vector, respectively. The single operand is a vector that contains @code{N} elements -of the same integral type. The result is a vector that contains half as many -elements, of an integral type whose size is twice as wide. In the case of -@code{VEC_UNPACK_HI_EXPR} the high @code{N/2} elements of the vector are -extracted and widened (promoted). In the case of @code{VEC_UNPACK_LO_EXPR} the -low @code{N/2} elements of the vector are extracted and widened (promoted). +of the same integral or floating point type. The result is a vector +that contains half as many elements, of an integral or floating point type +whose size is twice as wide. In the case of @code{VEC_UNPACK_HI_EXPR} the +high @code{N/2} elements of the vector are extracted and widened (promoted). +In the case of @code{VEC_UNPACK_LO_EXPR} the low @code{N/2} elements of the +vector are extracted and widened (promoted). + +@item VEC_PACK_TRUNC_EXPR +This node represents packing of truncated elements of the two input vectors +into the output vector. Input operands are vectors that contain the same +number of elements of the same integral or floating point type. The result +is a vector that contains twice as many elements of an integral or floating +point type whose size is half as wide. The elements of the two vectors are +demoted and merged (concatenated) to form the output vector. -@item VEC_PACK_MOD_EXPR @item VEC_PACK_SAT_EXPR -These nodes represent packing of elements of the two input vectors into the -output vector, using modulo or saturating arithmetic, respectively. -Their operands are vectors that contain the same number of elements -of the same integral type. The result is a vector that contains twice as many -elements, of an integral type whose size is half as wide. In both cases -the elements of the two vectors are demoted and merged (concatenated) to form -the output vector. +This node represents packing of elements of the two input vectors into the +output vector using saturation. Input operands are vectors that contain +the same number of elements of the same integral type. The result is a +vector that contains twice as many elements of an integral type whose size +is half as wide. The elements of the two vectors are demoted and merged +(concatenated) to form the output vector. @item VEC_EXTRACT_EVEN_EXPR @item VEC_EXTRACT_ODD_EXPR diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 4d485df41b8..01705ad282d 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -3591,35 +3591,48 @@ Operand 2 is an integer shift amount in bits. Operand 0 is where the resulting shifted vector is stored. The output and input vectors should have the same modes. -@cindex @code{vec_pack_mod_@var{m}} instruction pattern +@cindex @code{vec_pack_trunc_@var{m}} instruction pattern +@item @samp{vec_pack_trunc_@var{m}} +Narrow (demote) and merge the elements of two vectors. Operands 1 and 2 +are vectors of the same mode having N integral or floating point elements +of size S. Operand 0 is the resulting vector in which 2*N elements of +size N/2 are concatenated after narrowing them down using truncation. + @cindex @code{vec_pack_ssat_@var{m}} instruction pattern @cindex @code{vec_pack_usat_@var{m}} instruction pattern -@item @samp{vec_pack_mod_@var{m}}, @samp{vec_pack_ssat_@var{m}}, @samp{vec_pack_usat_@var{m}} -Narrow (demote) and merge the elements of two vectors. -Operands 1 and 2 are vectors of the same mode. +@item @samp{vec_pack_ssat_@var{m}}, @samp{vec_pack_usat_@var{m}} +Narrow (demote) and merge the elements of two vectors. Operands 1 and 2 +are vectors of the same mode having N integral elements of size S. Operand 0 is the resulting vector in which the elements of the two input -vectors are concatenated after narrowing them down using modulo arithmetic or -signed/unsigned saturating arithmetic. +vectors are concatenated after narrowing them down using signed/unsigned +saturating arithmetic. @cindex @code{vec_unpacks_hi_@var{m}} instruction pattern @cindex @code{vec_unpacks_lo_@var{m}} instruction pattern +@item @samp{vec_unpacks_hi_@var{m}}, @samp{vec_unpacks_lo_@var{m}} +Extract and widen (promote) the high/low part of a vector of signed +integral or floating point elements. The input vector (operand 1) has N +elements of size S. Widen (promote) the high/low elements of the vector +using signed or floating point extension and place the resulting N/2 +values of size 2*S in the output vector (operand 0). + @cindex @code{vec_unpacku_hi_@var{m}} instruction pattern @cindex @code{vec_unpacku_lo_@var{m}} instruction pattern -@item @samp{vec_unpacks_hi_@var{m}}, @samp{vec_unpacks_lo_@var{m}}, @samp{vec_unpacku_hi_@var{m}}, @samp{vec_unpacku_lo_@var{m}} -Extract and widen (promote) the high/low part of a vector of signed/unsigned -elements. The input vector (operand 1) has N signed/unsigned elements of size S. -Using sign/zero extension widen (promote) the high/low elements of the vector, -and place the resulting N/2 values of size 2*S in the output vector (operand 0). +@item @samp{vec_unpacku_hi_@var{m}}, @samp{vec_unpacku_lo_@var{m}} +Extract and widen (promote) the high/low part of a vector of unsigned +integral elements. The input vector (operand 1) has N elements of size S. +Widen (promote) the high/low elements of the vector using zero extension and +place the resulting N/2 values of size 2*S in the output vector (operand 0). @cindex @code{vec_widen_umult_hi_@var{m}} instruction pattern @cindex @code{vec_widen_umult_lo__@var{m}} instruction pattern @cindex @code{vec_widen_smult_hi_@var{m}} instruction pattern @cindex @code{vec_widen_smult_lo_@var{m}} instruction pattern @item @samp{vec_widen_umult_hi_@var{m}}, @samp{vec_widen_umult_lo_@var{m}}, @samp{vec_widen_smult_hi_@var{m}}, @samp{vec_widen_smult_lo_@var{m}} -Signed/Unsigned widening multiplication. -The two inputs (operands 1 and 2) are vectors with N -signed/unsigned elements of size S. Multiply the high/low elements of the two -vectors, and put the N/2 products of size 2*S in the output vector (operand 0). +Signed/Unsigned widening multiplication. The two inputs (operands 1 and 2) +are vectors with N signed/unsigned elements of size S. Multiply the high/low +elements of the two vectors, and put the N/2 products of size 2*S in the +output vector (operand 0). @cindex @code{mulhisi3} instruction pattern @item @samp{mulhisi3} |