xref: /titanic_52/usr/src/lib/libbc/libc/gen/common/ieee_globals.c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 #pragma ident	"%Z%%M%	%I%	%E% SMI"
23 
24 /*
25  * Copyright (c) 1987 by Sun Microsystems, Inc.
26  */
27 
28 /*
29  * contains definitions for variables for IEEE floating-point arithmetic
30  * modes; IEEE floating-point arithmetic exception handling;
31  */
32 
33 #include <floatingpoint.h>
34 
35 enum fp_direction_type fp_direction;
36 /*
37  * Current rounding direction. Updated by ieee_flags.
38  */
39 
40 enum fp_precision_type fp_precision;
41 /*
42  * Current rounding precision. Updated by ieee_flags.
43  */
44 
45 sigfpe_handler_type ieee_handlers[N_IEEE_EXCEPTION];
46 /*
47  * Array of pointers to functions to handle SIGFPE's corresponding to IEEE
48  * fp_exceptions. sigfpe_default means do not generate SIGFPE. An invalid
49  * address such as sigfpe_abort will cause abort on that SIGFPE. Updated by
50  * ieee_handler.
51  */
52 fp_exception_field_type fp_accrued_exceptions;
53 /*
54  * Sticky accumulated exceptions, updated by ieee_flags. In hardware
55  * implementations this variable is not automatically updated as the hardware
56  * changes and should therefore not be relied on directly.
57  */
58