1 '\" te
   2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH GETISAX 2 "Nov 7, 2007"
   7 .SH NAME
   8 getisax \- extract valid instruction set extensions
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 #include <sys/auxv.h>
  13 
  14 \fBuint_t\fR \fBgetisax\fR(\fBuint32_t *\fR\fIarray\fR, \fBuint_t\fR \fIn\fR);
  15 .fi
  16 
  17 .SH DESCRIPTION
  18 .LP
  19 The \fBgetisax()\fR function sets the vector \fIarray\fR of \fIn\fR 32-bit
  20 integers to contain the bits from the \fBAV\fR_\fIxxx\fR_\fIyyy\fR namespace of
  21 the given instruction set architecture.
  22 .sp
  23 .LP
  24 Values for \fBAV\fR_\fIxxx\fR_\fIyyy\fR for SPARC and SPARCV9, and their
  25 associated descriptions, can be found in \fB<sys/auxv_SPARC.h>\fR.
  26 .sp
  27 .LP
  28 Values for \fBAV\fR_\fIxxx\fR_\fIyyy\fR for i386 and AMD64, and their
  29 associated descriptions, can be found in \fB<sys/auxv_386.h>\fR.
  30 .SH RETURN VALUES
  31 .LP
  32 The \fBgetisax()\fR function returns the number of array elements that contain
  33 non-zero values.
  34 .SH EXAMPLES
  35 .LP
  36 \fBExample 1 \fRUse \fBgetisax()\fR to determine if the SSE2 instruction set is
  37 present.
  38 .sp
  39 .LP
  40 In the following example, if the message is written, the SSE2 instruction set
  41 is present and fully supported by the operating system.
  42 
  43 .sp
  44 .in +2
  45 .nf
  46 uint_t ui;
  47 
  48 (void) getisax(&ui, 1);
  49 
  50 if (ui & AV_386_SSE2)
  51         printf("SSE2 instruction set extension is present.\en");
  52 .fi
  53 .in -2
  54 
  55 .SH ATTRIBUTES
  56 .LP
  57 See \fBattributes\fR(5) for descriptions of the following attributes:
  58 .sp
  59 
  60 .sp
  61 .TS
  62 box;
  63 c | c
  64 l | l .
  65 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  66 _
  67 Interface Stability     Committed
  68 _
  69 MT-Level        Safe
  70 .TE
  71 
  72 .SH SEE ALSO
  73 .LP
  74 \fBisainfo\fR(1), \fBld\fR(1), \fBpargs\fR(1), \fBattributes\fR(5)
  75 .sp
  76 .LP
  77 \fILinker and Libraries Guide\fR
  78 .sp
  79 .LP
  80 \fISPARC Assembly Language Reference Manual\fR
  81 .sp
  82 .LP
  83 \fIx86 Assembly Language Reference Manual\fR