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 .sp 19 .LP 20 The \fBgetisax()\fR function sets the vector \fIarray\fR of \fIn\fR 32-bit 21 integers to contain the bits from the \fBAV\fR_\fIxxx\fR_\fIyyy\fR namespace of 22 the given instruction set architecture. 23 .sp 24 .LP 25 Values for \fBAV\fR_\fIxxx\fR_\fIyyy\fR for SPARC and SPARCV9, and their 26 associated descriptions, can be found in \fB<sys/auxv_SPARC.h>\fR. 27 .sp 28 .LP 29 Values for \fBAV\fR_\fIxxx\fR_\fIyyy\fR for i386 and AMD64, and their 30 associated descriptions, can be found in \fB<sys/auxv_386.h>\fR. 31 .SH RETURN VALUES 32 .sp 33 .LP 34 The \fBgetisax()\fR function returns the number of array elements that contain 35 non-zero values. 36 .SH EXAMPLES 37 .LP 38 \fBExample 1 \fRUse \fBgetisax()\fR to determine if the SSE2 instruction set is 39 present. 40 .sp 41 .LP 42 In the following example, if the message is written, the SSE2 instruction set 43 is present and fully supportred by the operating system. 44 45 .sp 46 .in +2 47 .nf 48 uint_t ui; 49 50 (void) getisax(&ui, 1); 51 52 if (ui & AV_386_SSE2) 53 printf("SSE2 instruction set extension is present.\en"); 54 .fi 55 .in -2 56 57 .SH ATTRIBUTES 58 .sp 59 .LP 60 See \fBattributes\fR(5) for descriptions of the following attributes: 61 .sp 62 63 .sp 64 .TS 65 box; 66 c | c 67 l | l . 68 ATTRIBUTE TYPE ATTRIBUTE VALUE 69 _ 70 Interface Stability Committed 71 _ 72 MT-Level Safe 73 .TE 74 75 .SH SEE ALSO 76 .sp 77 .LP 78 \fBisainfo\fR(1), \fBld\fR(1), \fBpargs\fR(1), \fBattributes\fR(5) 79 .sp 80 .LP 81 \fILinker and Libraries Guide\fR 82 .sp 83 .LP 84 \fISPARC Assembly Language Reference Manual\fR 85 .sp 86 .LP 87 \fIx86 Assembly Language Reference Manual\fR