aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.texi
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>2000-06-24 11:12:58 +0000
committerBernd Schmidt <crux@gcc.gnu.org>2000-06-24 11:12:58 +0000
commitf9f27ee563eb3741820d0fa91196900dd5621108 (patch)
treedac16ab34bb2645a309aa730b9bf3506da65f28b /gcc/rtl.texi
parente4e3ab5ad4749f7d157da8e34c9ffa7175dc6866 (diff)
downloadgcc-f9f27ee563eb3741820d0fa91196900dd5621108.zip
gcc-f9f27ee563eb3741820d0fa91196900dd5621108.tar.gz
gcc-f9f27ee563eb3741820d0fa91196900dd5621108.tar.bz2
Vector support: rtx and mode definitions
From-SVN: r34677
Diffstat (limited to 'gcc/rtl.texi')
-rw-r--r--gcc/rtl.texi85
1 files changed, 85 insertions, 0 deletions
diff --git a/gcc/rtl.texi b/gcc/rtl.texi
index 55208ae..0bd9f0c 100644
--- a/gcc/rtl.texi
+++ b/gcc/rtl.texi
@@ -29,6 +29,7 @@ form uses nested parentheses to indicate the pointers in the internal form.
* Arithmetic:: Expressions representing arithmetic on other expressions.
* Comparisons:: Expressions representing comparison of expressions.
* Bit Fields:: Expressions representing bitfields in memory or reg.
+* Vector Operations:: Expressions involving vector datatypes.
* Conversions:: Extending, truncating, floating or fixing.
* RTL Declarations:: Declaring volatility, constancy, etc.
* Side Effects:: Expressions for storing in registers, etc.
@@ -1347,6 +1348,30 @@ item minus the number of bits set by the @code{high} code
@item (minus:@var{m} @var{x} @var{y})
Like @code{plus} but represents subtraction.
+@findex ss_plus
+@cindex RTL addition with signed saturation
+@item (ss_plus:@var{m} @var{x} @var{y})
+
+Like @code{plus}, but using signed saturation in case of an overflow.
+
+@findex us_plus
+@cindex RTL addition with unsigned saturation
+@item (us_plus:@var{m} @var{x} @var{y})
+
+Like @code{plus}, but using unsigned saturation in case of an overflow.
+
+@findex ss_minus
+@cindex RTL addition with signed saturation
+@item (ss_minus:@var{m} @var{x} @var{y})
+
+Like @code{minus}, but using signed saturation in case of an overflow.
+
+@findex us_minus
+@cindex RTL addition with unsigned saturation
+@item (us_minus:@var{m} @var{x} @var{y})
+
+Like @code{minus}, but using unsigned saturation in case of an overflow.
+
@findex compare
@cindex RTL comparison
@item (compare:@var{m} @var{x} @var{y})
@@ -1695,6 +1720,52 @@ bit field. The same sequence of bits are extracted, but they
are filled to an entire word with zeros instead of by sign-extension.
@end table
+@node Vector Operations
+@section Vector Operations
+@cindex vector operations
+
+All normal rtl expressions can be used with vector modes; they are
+interpreted as operating on each part of the vector independently.
+Additionally, there are a few new expressions to describe specific vector
+operations.
+
+@table @code
+@findex vec_merge
+@item (vec_merge:@var{m} @var{vec1} @var{vec2} @var{items})
+This describes a merge operation between two vectors. The result is a vector
+of mode @var{m}; its elements are selected from either @var{vec1} or
+@var{vec2}. Which elements are selected is described by @var{items}, which
+is a bit mask represented by a @code{const_int}; a zero bit indicates the
+corresponding element in the result vector is taken from @var{vec2} while
+a set bit indicates it is taken from @var{vec1}.
+
+@findex vec_select
+@item (vec_select:@var{m} @var{vec1} @var{selection})
+This describes an operation that selects parts of a vector. @var{vec1} is
+the source vector, @var{selection} is a @code{parallel} that contains a
+@code{const_int} for each of the subparts of the result vector, giving the
+number of the source subpart that should be stored into it.
+
+@findex vec_concat
+@item (vec_concat:@var{m} @var{vec1} @var{vec2})
+Describes a vector concat operation. The result is a concatenation of the
+vectors @var{vec1} and @var{vec2}; its length is the sum of the lengths of
+the two inputs.
+
+@findex vec_const
+@item (vec_const:@var{m} @var{subparts})
+This describes a constant vector. @var{subparts} is a @code{parallel} that
+contains a constant for each of the subparts of the vector.
+
+@findex vec_duplicate
+@item (vec_duplicate:@var{m} @var{vec})
+This operation converts a small vector into a larger one by duplicating the
+input values. The output vector mode must have the same submodes as the
+input vector mode, and the number of output parts must be an integer multiple
+of the number of input parts.
+
+@end table
+
@node Conversions
@section Conversions
@cindex conversions
@@ -1747,6 +1818,20 @@ Represents the result of truncating the value @var{x}
to machine mode @var{m}. @var{m} must be a fixed-point mode
and @var{x} a fixed-point value of a mode wider than @var{m}.
+@findex ss_truncate
+@item (ss_truncate:@var{m} @var{x})
+Represents the result of truncating the value @var{x}
+to machine mode @var{m}, using signed saturation in the case of
+overflow. Both @var{m} and the mode of @var{x} must be fixed-point
+modes.
+
+@findex us_truncate
+@item (us_truncate:@var{m} @var{x})
+Represents the result of truncating the value @var{x}
+to machine mode @var{m}, using unsigned saturation in the case of
+overflow. Both @var{m} and the mode of @var{x} must be fixed-point
+modes.
+
@findex float_truncate
@item (float_truncate:@var{m} @var{x})
Represents the result of truncating the value @var{x}