1<html lang="en"> 2<head> 3<title>SPARC VIS Built-in Functions - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Target-Builtins.html#Target-Builtins" title="Target Builtins"> 9<link rel="prev" href="RX-Built_002din-Functions.html#RX-Built_002din-Functions" title="RX Built-in Functions"> 10<link rel="next" href="SPU-Built_002din-Functions.html#SPU-Built_002din-Functions" title="SPU Built-in Functions"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="SPARC-VIS-Built-in-Functions"></a> 51<a name="SPARC-VIS-Built_002din-Functions"></a> 52<p> 53Next: <a rel="next" accesskey="n" href="SPU-Built_002din-Functions.html#SPU-Built_002din-Functions">SPU Built-in Functions</a>, 54Previous: <a rel="previous" accesskey="p" href="RX-Built_002din-Functions.html#RX-Built_002din-Functions">RX Built-in Functions</a>, 55Up: <a rel="up" accesskey="u" href="Target-Builtins.html#Target-Builtins">Target Builtins</a> 56<hr> 57</div> 58 59<h4 class="subsection">6.54.14 SPARC VIS Built-in Functions</h4> 60 61<p>GCC supports SIMD operations on the SPARC using both the generic vector 62extensions (see <a href="Vector-Extensions.html#Vector-Extensions">Vector Extensions</a>) as well as built-in functions for 63the SPARC Visual Instruction Set (VIS). When you use the <samp><span class="option">-mvis</span></samp> 64switch, the VIS extension is exposed as the following built-in functions: 65 66<pre class="smallexample"> typedef int v2si __attribute__ ((vector_size (8))); 67 typedef short v4hi __attribute__ ((vector_size (8))); 68 typedef short v2hi __attribute__ ((vector_size (4))); 69 typedef char v8qi __attribute__ ((vector_size (8))); 70 typedef char v4qi __attribute__ ((vector_size (4))); 71 72 void * __builtin_vis_alignaddr (void *, long); 73 int64_t __builtin_vis_faligndatadi (int64_t, int64_t); 74 v2si __builtin_vis_faligndatav2si (v2si, v2si); 75 v4hi __builtin_vis_faligndatav4hi (v4si, v4si); 76 v8qi __builtin_vis_faligndatav8qi (v8qi, v8qi); 77 78 v4hi __builtin_vis_fexpand (v4qi); 79 80 v4hi __builtin_vis_fmul8x16 (v4qi, v4hi); 81 v4hi __builtin_vis_fmul8x16au (v4qi, v4hi); 82 v4hi __builtin_vis_fmul8x16al (v4qi, v4hi); 83 v4hi __builtin_vis_fmul8sux16 (v8qi, v4hi); 84 v4hi __builtin_vis_fmul8ulx16 (v8qi, v4hi); 85 v2si __builtin_vis_fmuld8sux16 (v4qi, v2hi); 86 v2si __builtin_vis_fmuld8ulx16 (v4qi, v2hi); 87 88 v4qi __builtin_vis_fpack16 (v4hi); 89 v8qi __builtin_vis_fpack32 (v2si, v2si); 90 v2hi __builtin_vis_fpackfix (v2si); 91 v8qi __builtin_vis_fpmerge (v4qi, v4qi); 92 93 int64_t __builtin_vis_pdist (v8qi, v8qi, int64_t); 94</pre> 95 </body></html> 96 97