|
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>SPARC VIS Built-in Functions (Using the GNU Compiler Collection (GCC))</title>
-
- <meta name="description" content="SPARC VIS Built-in Functions (Using the GNU Compiler Collection (GCC))">
- <meta name="keywords" content="SPARC VIS Built-in Functions (Using the GNU Compiler Collection (GCC))">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <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="Target-Builtins.html#Target-Builtins" rel="up" title="Target Builtins">
- <link href="TI-C6X-Built_002din-Functions.html#TI-C6X-Built_002din-Functions" rel="next" title="TI C6X Built-in Functions">
- <link href="SH-Built_002din-Functions.html#SH-Built_002din-Functions" rel="prev" title="SH Built-in Functions">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- 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.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="SPARC-VIS-Built_002din-Functions"></a>
- <div class="header">
- <p>
- Next: <a href="TI-C6X-Built_002din-Functions.html#TI-C6X-Built_002din-Functions" accesskey="n" rel="next">TI C6X Built-in Functions</a>, Previous: <a href="SH-Built_002din-Functions.html#SH-Built_002din-Functions" accesskey="p" rel="prev">SH Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</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="SPARC-VIS-Built_002din-Functions-1"></a>
- <h4 class="subsection">6.60.30 SPARC VIS Built-in Functions</h4>
-
- <p>GCC supports SIMD operations on the SPARC using both the generic vector
- extensions (see <a href="Vector-Extensions.html#Vector-Extensions">Vector Extensions</a>) as well as built-in functions for
- the SPARC Visual Instruction Set (VIS). When you use the <samp>-mvis</samp>
- switch, the VIS extension is exposed as the following built-in functions:
- </p>
- <div class="smallexample">
- <pre class="smallexample">typedef int v1si __attribute__ ((vector_size (4)));
- typedef int v2si __attribute__ ((vector_size (8)));
- typedef short v4hi __attribute__ ((vector_size (8)));
- typedef short v2hi __attribute__ ((vector_size (4)));
- typedef unsigned char v8qi __attribute__ ((vector_size (8)));
- typedef unsigned char v4qi __attribute__ ((vector_size (4)));
-
- void __builtin_vis_write_gsr (int64_t);
- int64_t __builtin_vis_read_gsr (void);
-
- void * __builtin_vis_alignaddr (void *, long);
- void * __builtin_vis_alignaddrl (void *, long);
- int64_t __builtin_vis_faligndatadi (int64_t, int64_t);
- v2si __builtin_vis_faligndatav2si (v2si, v2si);
- v4hi __builtin_vis_faligndatav4hi (v4si, v4si);
- v8qi __builtin_vis_faligndatav8qi (v8qi, v8qi);
-
- v4hi __builtin_vis_fexpand (v4qi);
-
- v4hi __builtin_vis_fmul8x16 (v4qi, v4hi);
- v4hi __builtin_vis_fmul8x16au (v4qi, v2hi);
- v4hi __builtin_vis_fmul8x16al (v4qi, v2hi);
- v4hi __builtin_vis_fmul8sux16 (v8qi, v4hi);
- v4hi __builtin_vis_fmul8ulx16 (v8qi, v4hi);
- v2si __builtin_vis_fmuld8sux16 (v4qi, v2hi);
- v2si __builtin_vis_fmuld8ulx16 (v4qi, v2hi);
-
- v4qi __builtin_vis_fpack16 (v4hi);
- v8qi __builtin_vis_fpack32 (v2si, v8qi);
- v2hi __builtin_vis_fpackfix (v2si);
- v8qi __builtin_vis_fpmerge (v4qi, v4qi);
-
- int64_t __builtin_vis_pdist (v8qi, v8qi, int64_t);
-
- long __builtin_vis_edge8 (void *, void *);
- long __builtin_vis_edge8l (void *, void *);
- long __builtin_vis_edge16 (void *, void *);
- long __builtin_vis_edge16l (void *, void *);
- long __builtin_vis_edge32 (void *, void *);
- long __builtin_vis_edge32l (void *, void *);
-
- long __builtin_vis_fcmple16 (v4hi, v4hi);
- long __builtin_vis_fcmple32 (v2si, v2si);
- long __builtin_vis_fcmpne16 (v4hi, v4hi);
- long __builtin_vis_fcmpne32 (v2si, v2si);
- long __builtin_vis_fcmpgt16 (v4hi, v4hi);
- long __builtin_vis_fcmpgt32 (v2si, v2si);
- long __builtin_vis_fcmpeq16 (v4hi, v4hi);
- long __builtin_vis_fcmpeq32 (v2si, v2si);
-
- v4hi __builtin_vis_fpadd16 (v4hi, v4hi);
- v2hi __builtin_vis_fpadd16s (v2hi, v2hi);
- v2si __builtin_vis_fpadd32 (v2si, v2si);
- v1si __builtin_vis_fpadd32s (v1si, v1si);
- v4hi __builtin_vis_fpsub16 (v4hi, v4hi);
- v2hi __builtin_vis_fpsub16s (v2hi, v2hi);
- v2si __builtin_vis_fpsub32 (v2si, v2si);
- v1si __builtin_vis_fpsub32s (v1si, v1si);
-
- long __builtin_vis_array8 (long, long);
- long __builtin_vis_array16 (long, long);
- long __builtin_vis_array32 (long, long);
- </pre></div>
-
- <p>When you use the <samp>-mvis2</samp> switch, the VIS version 2.0 built-in
- functions also become available:
- </p>
- <div class="smallexample">
- <pre class="smallexample">long __builtin_vis_bmask (long, long);
- int64_t __builtin_vis_bshuffledi (int64_t, int64_t);
- v2si __builtin_vis_bshufflev2si (v2si, v2si);
- v4hi __builtin_vis_bshufflev2si (v4hi, v4hi);
- v8qi __builtin_vis_bshufflev2si (v8qi, v8qi);
-
- long __builtin_vis_edge8n (void *, void *);
- long __builtin_vis_edge8ln (void *, void *);
- long __builtin_vis_edge16n (void *, void *);
- long __builtin_vis_edge16ln (void *, void *);
- long __builtin_vis_edge32n (void *, void *);
- long __builtin_vis_edge32ln (void *, void *);
- </pre></div>
-
- <p>When you use the <samp>-mvis3</samp> switch, the VIS version 3.0 built-in
- functions also become available:
- </p>
- <div class="smallexample">
- <pre class="smallexample">void __builtin_vis_cmask8 (long);
- void __builtin_vis_cmask16 (long);
- void __builtin_vis_cmask32 (long);
-
- v4hi __builtin_vis_fchksm16 (v4hi, v4hi);
-
- v4hi __builtin_vis_fsll16 (v4hi, v4hi);
- v4hi __builtin_vis_fslas16 (v4hi, v4hi);
- v4hi __builtin_vis_fsrl16 (v4hi, v4hi);
- v4hi __builtin_vis_fsra16 (v4hi, v4hi);
- v2si __builtin_vis_fsll16 (v2si, v2si);
- v2si __builtin_vis_fslas16 (v2si, v2si);
- v2si __builtin_vis_fsrl16 (v2si, v2si);
- v2si __builtin_vis_fsra16 (v2si, v2si);
-
- long __builtin_vis_pdistn (v8qi, v8qi);
-
- v4hi __builtin_vis_fmean16 (v4hi, v4hi);
-
- int64_t __builtin_vis_fpadd64 (int64_t, int64_t);
- int64_t __builtin_vis_fpsub64 (int64_t, int64_t);
-
- v4hi __builtin_vis_fpadds16 (v4hi, v4hi);
- v2hi __builtin_vis_fpadds16s (v2hi, v2hi);
- v4hi __builtin_vis_fpsubs16 (v4hi, v4hi);
- v2hi __builtin_vis_fpsubs16s (v2hi, v2hi);
- v2si __builtin_vis_fpadds32 (v2si, v2si);
- v1si __builtin_vis_fpadds32s (v1si, v1si);
- v2si __builtin_vis_fpsubs32 (v2si, v2si);
- v1si __builtin_vis_fpsubs32s (v1si, v1si);
-
- long __builtin_vis_fucmple8 (v8qi, v8qi);
- long __builtin_vis_fucmpne8 (v8qi, v8qi);
- long __builtin_vis_fucmpgt8 (v8qi, v8qi);
- long __builtin_vis_fucmpeq8 (v8qi, v8qi);
-
- float __builtin_vis_fhadds (float, float);
- double __builtin_vis_fhaddd (double, double);
- float __builtin_vis_fhsubs (float, float);
- double __builtin_vis_fhsubd (double, double);
- float __builtin_vis_fnhadds (float, float);
- double __builtin_vis_fnhaddd (double, double);
-
- int64_t __builtin_vis_umulxhi (int64_t, int64_t);
- int64_t __builtin_vis_xmulx (int64_t, int64_t);
- int64_t __builtin_vis_xmulxhi (int64_t, int64_t);
- </pre></div>
-
- <p>When you use the <samp>-mvis4</samp> switch, the VIS version 4.0 built-in
- functions also become available:
- </p>
- <div class="smallexample">
- <pre class="smallexample">v8qi __builtin_vis_fpadd8 (v8qi, v8qi);
- v8qi __builtin_vis_fpadds8 (v8qi, v8qi);
- v8qi __builtin_vis_fpaddus8 (v8qi, v8qi);
- v4hi __builtin_vis_fpaddus16 (v4hi, v4hi);
-
- v8qi __builtin_vis_fpsub8 (v8qi, v8qi);
- v8qi __builtin_vis_fpsubs8 (v8qi, v8qi);
- v8qi __builtin_vis_fpsubus8 (v8qi, v8qi);
- v4hi __builtin_vis_fpsubus16 (v4hi, v4hi);
-
- long __builtin_vis_fpcmple8 (v8qi, v8qi);
- long __builtin_vis_fpcmpgt8 (v8qi, v8qi);
- long __builtin_vis_fpcmpule16 (v4hi, v4hi);
- long __builtin_vis_fpcmpugt16 (v4hi, v4hi);
- long __builtin_vis_fpcmpule32 (v2si, v2si);
- long __builtin_vis_fpcmpugt32 (v2si, v2si);
-
- v8qi __builtin_vis_fpmax8 (v8qi, v8qi);
- v4hi __builtin_vis_fpmax16 (v4hi, v4hi);
- v2si __builtin_vis_fpmax32 (v2si, v2si);
-
- v8qi __builtin_vis_fpmaxu8 (v8qi, v8qi);
- v4hi __builtin_vis_fpmaxu16 (v4hi, v4hi);
- v2si __builtin_vis_fpmaxu32 (v2si, v2si);
-
-
- v8qi __builtin_vis_fpmin8 (v8qi, v8qi);
- v4hi __builtin_vis_fpmin16 (v4hi, v4hi);
- v2si __builtin_vis_fpmin32 (v2si, v2si);
-
- v8qi __builtin_vis_fpminu8 (v8qi, v8qi);
- v4hi __builtin_vis_fpminu16 (v4hi, v4hi);
- v2si __builtin_vis_fpminu32 (v2si, v2si);
- </pre></div>
-
- <p>When you use the <samp>-mvis4b</samp> switch, the VIS version 4.0B
- built-in functions also become available:
- </p>
- <div class="smallexample">
- <pre class="smallexample">v8qi __builtin_vis_dictunpack8 (double, int);
- v4hi __builtin_vis_dictunpack16 (double, int);
- v2si __builtin_vis_dictunpack32 (double, int);
-
- long __builtin_vis_fpcmple8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpgt8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpeq8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpne8shl (v8qi, v8qi, int);
-
- long __builtin_vis_fpcmple16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpgt16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpeq16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpne16shl (v4hi, v4hi, int);
-
- long __builtin_vis_fpcmple32shl (v2si, v2si, int);
- long __builtin_vis_fpcmpgt32shl (v2si, v2si, int);
- long __builtin_vis_fpcmpeq32shl (v2si, v2si, int);
- long __builtin_vis_fpcmpne32shl (v2si, v2si, int);
-
- long __builtin_vis_fpcmpule8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpugt8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpule16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpugt16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpule32shl (v2si, v2si, int);
- long __builtin_vis_fpcmpugt32shl (v2si, v2si, int);
-
- long __builtin_vis_fpcmpde8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpde16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpde32shl (v2si, v2si, int);
-
- long __builtin_vis_fpcmpur8shl (v8qi, v8qi, int);
- long __builtin_vis_fpcmpur16shl (v4hi, v4hi, int);
- long __builtin_vis_fpcmpur32shl (v2si, v2si, int);
- </pre></div>
-
- <hr>
- <div class="header">
- <p>
- Next: <a href="TI-C6X-Built_002din-Functions.html#TI-C6X-Built_002din-Functions" accesskey="n" rel="next">TI C6X Built-in Functions</a>, Previous: <a href="SH-Built_002din-Functions.html#SH-Built_002din-Functions" accesskey="p" rel="prev">SH Built-in Functions</a>, Up: <a href="Target-Builtins.html#Target-Builtins" accesskey="u" rel="up">Target Builtins</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>
|