diff options
author | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
commit | abdaadbcae30fe0c9a66c7516798279fdfd97750 (patch) | |
tree | 00a54a6e25601e43876d03c1a4a12a749d4a914c /share/doc/gccint/Vectors.html |
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Change-Id: I7303388733328cd98ab9aa3c30236db67f2e9e9c
Diffstat (limited to 'share/doc/gccint/Vectors.html')
-rw-r--r-- | share/doc/gccint/Vectors.html | 277 |
1 files changed, 277 insertions, 0 deletions
diff --git a/share/doc/gccint/Vectors.html b/share/doc/gccint/Vectors.html new file mode 100644 index 0000000..f86ca74 --- /dev/null +++ b/share/doc/gccint/Vectors.html @@ -0,0 +1,277 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 1988-2023 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "Funding Free Software", the Front-Cover +Texts being (a) (see below), and with the Back-Cover Texts being (b) +(see below). A copy of the license is included in the section entitled +"GNU Free Documentation License". + +(a) The FSF's Front-Cover Text is: + +A GNU Manual + +(b) The FSF's Back-Cover Text is: + +You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. --> +<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> +<head> +<title>GNU Compiler Collection (GCC) Internals: Vectors</title> + +<meta name="description" content="GNU Compiler Collection (GCC) Internals: Vectors"> +<meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Vectors"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Option-Index.html#Option-Index" rel="index" title="Option Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Expression-trees.html#Expression-trees" rel="up" title="Expression trees"> +<link href="Statements.html#Statements" rel="next" title="Statements"> +<link href="Unary-and-Binary-Expressions.html#Unary-and-Binary-Expressions" rel="previous" title="Unary and Binary Expressions"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.indentedblock {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smallindentedblock {margin-left: 3.2em; font-size: smaller} +div.smalllisp {margin-left: 3.2em} +kbd {font-style:oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nocodebreak {white-space:nowrap} +span.nolinebreak {white-space:nowrap} +span.roman {font-family:serif; font-weight:normal} +span.sansserif {font-family:sans-serif; font-weight:normal} +ul.no-bullet {list-style: none} +--> +</style> + + +</head> + +<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> +<a name="Vectors"></a> +<div class="header"> +<p> +Previous: <a href="Unary-and-Binary-Expressions.html#Unary-and-Binary-Expressions" accesskey="p" rel="previous">Unary and Binary Expressions</a>, Up: <a href="Expression-trees.html#Expression-trees" accesskey="u" rel="up">Expression trees</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Vectors-1"></a> +<h4 class="subsection">11.6.4 Vectors</h4> +<a name="index-VEC_005fDUPLICATE_005fEXPR"></a> +<a name="index-VEC_005fSERIES_005fEXPR"></a> +<a name="index-VEC_005fLSHIFT_005fEXPR"></a> +<a name="index-VEC_005fRSHIFT_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fMULT_005fHI_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fMULT_005fLO_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fPLUS_005fHI_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fPLUS_005fLO_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fMINUS_005fHI_005fEXPR"></a> +<a name="index-VEC_005fWIDEN_005fMINUS_005fLO_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fHI_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fLO_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fFLOAT_005fHI_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fFLOAT_005fLO_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fFIX_005fTRUNC_005fHI_005fEXPR"></a> +<a name="index-VEC_005fUNPACK_005fFIX_005fTRUNC_005fLO_005fEXPR"></a> +<a name="index-VEC_005fPACK_005fTRUNC_005fEXPR"></a> +<a name="index-VEC_005fPACK_005fSAT_005fEXPR"></a> +<a name="index-VEC_005fPACK_005fFIX_005fTRUNC_005fEXPR"></a> +<a name="index-VEC_005fPACK_005fFLOAT_005fEXPR"></a> +<a name="index-VEC_005fCOND_005fEXPR"></a> +<a name="index-SAD_005fEXPR"></a> + +<dl compact="compact"> +<dt><code>VEC_DUPLICATE_EXPR</code></dt> +<dd><p>This node has a single operand and represents a vector in which every +element is equal to that operand. +</p> +</dd> +<dt><code>VEC_SERIES_EXPR</code></dt> +<dd><p>This node represents a vector formed from a scalar base and step, +given as the first and second operands respectively. Element <var>i</var> +of the result is equal to ‘<samp><var>base</var> + <var>i</var>*<var>step</var></samp>’. +</p> +<p>This node is restricted to integral types, in order to avoid +specifying the rounding behavior for floating-point types. +</p> +</dd> +<dt><code>VEC_LSHIFT_EXPR</code></dt> +<dt><code>VEC_RSHIFT_EXPR</code></dt> +<dd><p>These nodes represent whole vector left and right shifts, respectively. +The first operand is the vector to shift; it will always be of vector type. +The second operand is an expression for the number of bits by which to +shift. Note that the result is undefined if the second operand is larger +than or equal to the first operand’s type size. +</p> +</dd> +<dt><code>VEC_WIDEN_MULT_HI_EXPR</code></dt> +<dt><code>VEC_WIDEN_MULT_LO_EXPR</code></dt> +<dd><p>These nodes represent widening vector multiplication of the high and low +parts of the two input vectors, respectively. Their operands are vectors +that contain the same number of elements (<code>N</code>) 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_WIDEN_MULT_HI_EXPR</code> the +high <code>N/2</code> elements of the two vector are multiplied to produce the +vector of <code>N/2</code> products. In the case of <code>VEC_WIDEN_MULT_LO_EXPR</code> the +low <code>N/2</code> elements of the two vector are multiplied to produce the +vector of <code>N/2</code> products. +</p> +</dd> +<dt><code>VEC_WIDEN_PLUS_HI_EXPR</code></dt> +<dt><code>VEC_WIDEN_PLUS_LO_EXPR</code></dt> +<dd><p>These nodes represent widening vector addition of the high and low parts of +the two input vectors, respectively. Their operands are vectors that contain +the same number of elements (<code>N</code>) 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_WIDEN_PLUS_HI_EXPR</code> the high +<code>N/2</code> elements of the two vectors are added to produce the vector of +<code>N/2</code> products. In the case of <code>VEC_WIDEN_PLUS_LO_EXPR</code> the low +<code>N/2</code> elements of the two vectors are added to produce the vector of +<code>N/2</code> products. +</p> +</dd> +<dt><code>VEC_WIDEN_MINUS_HI_EXPR</code></dt> +<dt><code>VEC_WIDEN_MINUS_LO_EXPR</code></dt> +<dd><p>These nodes represent widening vector subtraction of the high and low parts of +the two input vectors, respectively. Their operands are vectors that contain +the same number of elements (<code>N</code>) of the same integral type. The high/low +elements of the second vector are subtracted from the high/low elements of the +first. 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_WIDEN_MINUS_HI_EXPR</code> the high <code>N/2</code> elements of the second +vector are subtracted from the high <code>N/2</code> of the first to produce the +vector of <code>N/2</code> products. In the case of +<code>VEC_WIDEN_MINUS_LO_EXPR</code> the low <code>N/2</code> elements of the second +vector are subtracted from the low <code>N/2</code> of the first to produce the +vector of <code>N/2</code> products. +</p> +</dd> +<dt><code>VEC_UNPACK_HI_EXPR</code></dt> +<dt><code>VEC_UNPACK_LO_EXPR</code></dt> +<dd><p>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</code> elements +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</code> the +high <code>N/2</code> elements of the vector are extracted and widened (promoted). +In the case of <code>VEC_UNPACK_LO_EXPR</code> the low <code>N/2</code> elements of the +vector are extracted and widened (promoted). +</p> +</dd> +<dt><code>VEC_UNPACK_FLOAT_HI_EXPR</code></dt> +<dt><code>VEC_UNPACK_FLOAT_LO_EXPR</code></dt> +<dd><p>These nodes represent unpacking of the high and low parts of the input vector, +where the values are converted from fixed point to floating point. The +single operand is a vector that contains <code>N</code> elements of the same +integral type. The result is a vector that contains half as many elements +of a floating point type whose size is twice as wide. In the case of +<code>VEC_UNPACK_FLOAT_HI_EXPR</code> the high <code>N/2</code> elements of the vector are +extracted, converted and widened. In the case of <code>VEC_UNPACK_FLOAT_LO_EXPR</code> +the low <code>N/2</code> elements of the vector are extracted, converted and widened. +</p> +</dd> +<dt><code>VEC_UNPACK_FIX_TRUNC_HI_EXPR</code></dt> +<dt><code>VEC_UNPACK_FIX_TRUNC_LO_EXPR</code></dt> +<dd><p>These nodes represent unpacking of the high and low parts of the input vector, +where the values are truncated from floating point to fixed point. The +single operand is a vector that contains <code>N</code> elements of the same +floating point 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_FIX_TRUNC_HI_EXPR</code> the high <code>N/2</code> elements of the +vector are extracted and converted with truncation. In the case of +<code>VEC_UNPACK_FIX_TRUNC_LO_EXPR</code> the low <code>N/2</code> elements of the +vector are extracted and converted with truncation. +</p> +</dd> +<dt><code>VEC_PACK_TRUNC_EXPR</code></dt> +<dd><p>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. +</p> +</dd> +<dt><code>VEC_PACK_SAT_EXPR</code></dt> +<dd><p>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. +</p> +</dd> +<dt><code>VEC_PACK_FIX_TRUNC_EXPR</code></dt> +<dd><p>This node represents packing of elements of the two input vectors into the +output vector, where the values are converted from floating point +to fixed point. Input operands are vectors that contain the same number +of elements of a floating point 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 merged (concatenated) to form the output +vector. +</p> +</dd> +<dt><code>VEC_PACK_FLOAT_EXPR</code></dt> +<dd><p>This node represents packing of elements of the two input vectors into the +output vector, where the values are converted from fixed point to floating +point. Input operands are vectors that contain the same number of elements +of an integral type. The result is a vector that contains twice as many +elements of floating point type whose size is half as wide. The elements of +the two vectors are merged (concatenated) to form the output vector. +</p> +</dd> +<dt><code>VEC_COND_EXPR</code></dt> +<dd><p>These nodes represent <code>?:</code> expressions. The three operands must be +vectors of the same size and number of elements. The second and third +operands must have the same type as the entire expression. The first +operand is of signed integral vector type. If an element of the first +operand evaluates to a zero value, the corresponding element of the +result is taken from the third operand. If it evaluates to a minus one +value, it is taken from the second operand. It should never evaluate to +any other value currently, but optimizations should not rely on that +property. In contrast with a <code>COND_EXPR</code>, all operands are always +evaluated. +</p> +</dd> +<dt><code>SAD_EXPR</code></dt> +<dd><p>This node represents the Sum of Absolute Differences operation. The three +operands must be vectors of integral types. The first and second operand +must have the same type. The size of the vector element of the third +operand must be at lease twice of the size of the vector element of the +first and second one. The SAD is calculated between the first and second +operands, added to the third operand, and returned. +</p> +</dd> +</dl> + + + +<hr> +<div class="header"> +<p> +Previous: <a href="Unary-and-Binary-Expressions.html#Unary-and-Binary-Expressions" accesskey="p" rel="previous">Unary and Binary Expressions</a>, Up: <a href="Expression-trees.html#Expression-trees" accesskey="u" rel="up">Expression trees</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> |