You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
194 lines
8.2 KiB
HTML
194 lines
8.2 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<title>SPARC VIS Built-in Functions - Using the GNU Compiler Collection (GCC)</title>
|
|
<meta http-equiv="Content-Type" content="text/html">
|
|
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
|
|
<meta name="generator" content="makeinfo 4.13">
|
|
<link title="Top" rel="start" href="index.html#Top">
|
|
<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins">
|
|
<link rel="prev" href="SH-Built_002din-Functions.html#SH-Built_002din-Functions" title="SH Built-in Functions">
|
|
<link rel="next" href="SPU-Built_002din-Functions.html#SPU-Built_002din-Functions" title="SPU Built-in Functions">
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
|
<!--
|
|
Copyright (C) 1988-2015 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.-->
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<style type="text/css"><!--
|
|
pre.display { font-family:inherit }
|
|
pre.format { font-family:inherit }
|
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
|
pre.smallexample { font-size:smaller }
|
|
pre.smalllisp { font-size:smaller }
|
|
span.sc { font-variant:small-caps }
|
|
span.roman { font-family:serif; font-weight:normal; }
|
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
<div class="node">
|
|
<a name="SPARC-VIS-Built-in-Functions"></a>
|
|
<a name="SPARC-VIS-Built_002din-Functions"></a>
|
|
<p>
|
|
Next: <a rel="next" accesskey="n" href="SPU-Built_002din-Functions.html#SPU-Built_002din-Functions">SPU Built-in Functions</a>,
|
|
Previous: <a rel="previous" accesskey="p" href="SH-Built_002din-Functions.html#SH-Built_002din-Functions">SH Built-in Functions</a>,
|
|
Up: <a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a>
|
|
<hr>
|
|
</div>
|
|
|
|
<h4 class="subsection">6.58.25 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><span class="option">-mvis</span></samp>
|
|
switch, the VIS extension is exposed as the following built-in functions:
|
|
|
|
<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>
|
|
<p>When you use the <samp><span class="option">-mvis2</span></samp> switch, the VIS version 2.0 built-in
|
|
functions also become available:
|
|
|
|
<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>
|
|
<p>When you use the <samp><span class="option">-mvis3</span></samp> switch, the VIS version 3.0 built-in
|
|
functions also become available:
|
|
|
|
<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>
|
|
</body></html>
|
|
|