12d367905a2e1b950f79b408141eea07c222b590bCalin Juravle/*- 22d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG> 32d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * All rights reserved. 42d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 52d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * Redistribution and use in source and binary forms, with or without 62d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * modification, are permitted provided that the following conditions 72d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * are met: 82d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 1. Redistributions of source code must retain the above copyright 92d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * notice, this list of conditions and the following disclaimer. 102d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 2. Redistributions in binary form must reproduce the above copyright 112d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * notice, this list of conditions and the following disclaimer in the 122d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * documentation and/or other materials provided with the distribution. 132d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 142d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 152d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 162d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 172d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 182d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 192d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 202d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 212d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 222d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 232d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 242d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * SUCH DAMAGE. 252d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 262d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * $FreeBSD: src/lib/msun/arm/fenv.h,v 1.5 2005/03/16 19:03:45 das Exp $ 272d367905a2e1b950f79b408141eea07c222b590bCalin Juravle */ 282d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 292d367905a2e1b950f79b408141eea07c222b590bCalin Juravle/* 302d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * Rewritten for Android. 312d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * 322d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * The ARM FPSCR is described here: 332d367905a2e1b950f79b408141eea07c222b590bCalin Juravle * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344b/Chdfafia.html 342d367905a2e1b950f79b408141eea07c222b590bCalin Juravle */ 352d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 362d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#ifndef _ARM_FENV_H_ 372d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define _ARM_FENV_H_ 382d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 392d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#include <sys/types.h> 402d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 412d367905a2e1b950f79b408141eea07c222b590bCalin Juravle__BEGIN_DECLS 422d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 432d367905a2e1b950f79b408141eea07c222b590bCalin Juravletypedef __uint32_t fenv_t; 442d367905a2e1b950f79b408141eea07c222b590bCalin Juravletypedef __uint32_t fexcept_t; 452d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 462d367905a2e1b950f79b408141eea07c222b590bCalin Juravle/* Exception flags. */ 472d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_INVALID 0x01 482d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_DIVBYZERO 0x02 492d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_OVERFLOW 0x04 502d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_UNDERFLOW 0x08 512d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_INEXACT 0x10 522d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \ 532d367905a2e1b950f79b408141eea07c222b590bCalin Juravle FE_OVERFLOW | FE_UNDERFLOW) 542d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 552d367905a2e1b950f79b408141eea07c222b590bCalin Juravle/* Rounding modes. */ 562d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_TONEAREST 0x0 572d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_UPWARD 0x1 582d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_DOWNWARD 0x2 592d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#define FE_TOWARDZERO 0x3 602d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 612d367905a2e1b950f79b408141eea07c222b590bCalin Juravle__END_DECLS 622d367905a2e1b950f79b408141eea07c222b590bCalin Juravle 632d367905a2e1b950f79b408141eea07c222b590bCalin Juravle#endif /* !_ARM_FENV_H_ */ 64