1*c078d6c7Sguenther /* $OpenBSD: fpgetsticky.c,v 1.6 2016/07/18 19:05:22 guenther Exp $ */
208daf0c2Sdrahn /* $NetBSD: fpgetsticky.c,v 1.2 2002/01/13 21:45:53 thorpej Exp $ */
308daf0c2Sdrahn
408daf0c2Sdrahn /*-
508daf0c2Sdrahn * Copyright (c) 1997 The NetBSD Foundation, Inc.
608daf0c2Sdrahn * All rights reserved.
708daf0c2Sdrahn *
808daf0c2Sdrahn * This code is derived from software contributed to The NetBSD Foundation
908daf0c2Sdrahn * by Neil A. Carson and Mark Brinicombe
1008daf0c2Sdrahn *
1108daf0c2Sdrahn * Redistribution and use in source and binary forms, with or without
1208daf0c2Sdrahn * modification, are permitted provided that the following conditions
1308daf0c2Sdrahn * are met:
1408daf0c2Sdrahn * 1. Redistributions of source code must retain the above copyright
1508daf0c2Sdrahn * notice, this list of conditions and the following disclaimer.
1608daf0c2Sdrahn * 2. Redistributions in binary form must reproduce the above copyright
1708daf0c2Sdrahn * notice, this list of conditions and the following disclaimer in the
1808daf0c2Sdrahn * documentation and/or other materials provided with the distribution.
1908daf0c2Sdrahn *
2008daf0c2Sdrahn * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2108daf0c2Sdrahn * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2208daf0c2Sdrahn * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2308daf0c2Sdrahn * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2408daf0c2Sdrahn * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2508daf0c2Sdrahn * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2608daf0c2Sdrahn * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2708daf0c2Sdrahn * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2808daf0c2Sdrahn * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2908daf0c2Sdrahn * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3008daf0c2Sdrahn * POSSIBILITY OF SUCH DAMAGE.
3108daf0c2Sdrahn */
3208daf0c2Sdrahn
3308daf0c2Sdrahn #include <ieeefp.h>
3408daf0c2Sdrahn #ifdef SOFTFLOAT_FOR_GCC
3508daf0c2Sdrahn #include "softfloat-for-gcc.h"
3608daf0c2Sdrahn #endif
3708daf0c2Sdrahn #include "milieu.h"
38fcc6486eSmiod #include <softfloat.h>
3908daf0c2Sdrahn
4008daf0c2Sdrahn __weak_alias(_fpgetsticky,fpgetsticky);
4108daf0c2Sdrahn
4208daf0c2Sdrahn fp_except
fpgetsticky(void)4308daf0c2Sdrahn fpgetsticky(void)
4408daf0c2Sdrahn {
4508daf0c2Sdrahn
4608daf0c2Sdrahn return float_exception_flags;
4708daf0c2Sdrahn }
48