libm.h revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8
/*
* CDDL HEADER START
*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBM_H
#define _LIBM_H
#include <sys/isa_defs.h>
#ifdef _ASM
/* BEGIN CSTYLED */
/*
* Disable amd64 assembly code profiling for now.
*/
#if defined(__amd64)
#endif
#include <sys/asm_linkage.h>
#define NAME(x) x
#define IDENT(x) .ident x
#if defined(__sparc)
#ifndef SET_FILE
#define SET_FILE(x) \
.file x
#endif /* !defined(SET_FILE) */
#ifdef PIC
/*
* One should *never* pass o7 to PIC_SETUP.
*/
/*
*/
#define PIC_LEAF_SETUP(via) \
#ifdef __sparcv9
#else /* defined(__sparcv9) */
#endif /* defined(__sparcv9) */
#else /* defined(PIC) */
#define PIC_LEAF_SETUP(via)
#ifdef __sparcv9
/*
* g1 is used as scratch register in V9 mode
*/
#else /* defined(__sparcv9) */
#endif /* defined(__sparcv9) */
#endif /* defined(PIC) */
/*
* Workaround for 4337025: MCOUNT in asm_linkage.h does not support __sparcv9
*/
#if !defined(PIC)
#define MCOUNT(x) \
restore; \
#define MCOUNT(x) \
restore; \
#else /* PIC13 */
#define MCOUNT(x) \
restore; \
#endif /* !defined(PIC) */
#endif /* defined(PROF) && defined(__sparcv9) */
#ifdef PIC
#if defined(__amd64)
#define PIC_SETUP(x)
#define PIC_WRAPUP
#else
#endif
#else /* defined(PIC) */
#define PIC_SETUP(x)
#define PIC_WRAPUP
#define PIC_F(x) x
#define PIC_G(x) x
#define PIC_L(x) x
#endif /* defined(PIC) */
#else
#endif
/* END CSTYLED */
#else /* defined(_ASM) */
#include "libm_macros.h"
#include "libm_synonyms.h"
#include "libm_protos.h"
#include "libm_inlines.h"
#include <math.h>
#if defined(__SUNPRO_C)
#include <sunmath.h>
#endif
#endif /* defined(_ASM) */
#endif /* _LIBM_H */