Deleted Added
full compact
softfloat.h (169721) softfloat.h (230189)
1/* $NetBSD: softfloat.h,v 1.6 2002/05/12 13:12:46 bjh21 Exp $ */
1/* $NetBSD: softfloat.h,v 1.6 2002/05/12 13:12:46 bjh21 Exp $ */
2/* $FreeBSD: head/lib/libc/arm/softfloat/softfloat.h 169721 2007-05-19 04:34:42Z kan $ */
2/* $FreeBSD: head/lib/libc/arm/softfloat/softfloat.h 230189 2012-01-16 04:05:53Z das $ */
3
4/* This is a derivative work. */
5
6/*
7===============================================================================
8
9This C header file is part of the SoftFloat IEC/IEEE Floating-point
10Arithmetic Package, Release 2a.

--- 29 unchanged lines hidden (view full) ---

40`floatx80' type will not be defined, and none of the functions that either
41input or output the `floatx80' type will be defined. The same applies to
42the `FLOAT128' macro and the quadruple-precision format `float128'.
43-------------------------------------------------------------------------------
44*/
45/* #define FLOATX80 */
46/* #define FLOAT128 */
47
3
4/* This is a derivative work. */
5
6/*
7===============================================================================
8
9This C header file is part of the SoftFloat IEC/IEEE Floating-point
10Arithmetic Package, Release 2a.

--- 29 unchanged lines hidden (view full) ---

40`floatx80' type will not be defined, and none of the functions that either
41input or output the `floatx80' type will be defined. The same applies to
42the `FLOAT128' macro and the quadruple-precision format `float128'.
43-------------------------------------------------------------------------------
44*/
45/* #define FLOATX80 */
46/* #define FLOAT128 */
47
48#include <machine/ieeefp.h>
48#include <fenv.h>
49
50/*
51-------------------------------------------------------------------------------
52Software IEC/IEEE floating-point types.
53-------------------------------------------------------------------------------
54*/
55typedef unsigned int float32;
56typedef unsigned long long float64;

--- 22 unchanged lines hidden (view full) ---

79 float_tininess_before_rounding = 1
80};
81
82/*
83-------------------------------------------------------------------------------
84Software IEC/IEEE floating-point rounding mode.
85-------------------------------------------------------------------------------
86*/
49
50/*
51-------------------------------------------------------------------------------
52Software IEC/IEEE floating-point types.
53-------------------------------------------------------------------------------
54*/
55typedef unsigned int float32;
56typedef unsigned long long float64;

--- 22 unchanged lines hidden (view full) ---

79 float_tininess_before_rounding = 1
80};
81
82/*
83-------------------------------------------------------------------------------
84Software IEC/IEEE floating-point rounding mode.
85-------------------------------------------------------------------------------
86*/
87extern fp_rnd_t float_rounding_mode;
87extern int float_rounding_mode;
88enum {
88enum {
89 float_round_nearest_even = FP_RN,
90 float_round_to_zero = FP_RZ,
91 float_round_down = FP_RM,
92 float_round_up = FP_RP
89 float_round_nearest_even = FE_TONEAREST,
90 float_round_to_zero = FE_TOWARDZERO,
91 float_round_down = FE_DOWNWARD,
92 float_round_up = FE_UPWARD
93};
94
95/*
96-------------------------------------------------------------------------------
97Software IEC/IEEE floating-point exception flags.
98-------------------------------------------------------------------------------
99*/
93};
94
95/*
96-------------------------------------------------------------------------------
97Software IEC/IEEE floating-point exception flags.
98-------------------------------------------------------------------------------
99*/
100extern fp_except float_exception_flags;
101extern fp_except float_exception_mask;
100extern int float_exception_flags;
101extern int float_exception_mask;
102enum {
102enum {
103 float_flag_inexact = FP_X_IMP,
104 float_flag_underflow = FP_X_UFL,
105 float_flag_overflow = FP_X_OFL,
106 float_flag_divbyzero = FP_X_DZ,
107 float_flag_invalid = FP_X_INV
103 float_flag_inexact = FE_INEXACT,
104 float_flag_underflow = FE_UNDERFLOW,
105 float_flag_overflow = FE_OVERFLOW,
106 float_flag_divbyzero = FE_DIVBYZERO,
107 float_flag_invalid = FE_INVALID
108};
109
110/*
111-------------------------------------------------------------------------------
112Routine to raise any or all of the software IEC/IEEE floating-point
113exception flags.
114-------------------------------------------------------------------------------
115*/
108};
109
110/*
111-------------------------------------------------------------------------------
112Routine to raise any or all of the software IEC/IEEE floating-point
113exception flags.
114-------------------------------------------------------------------------------
115*/
116void float_raise( fp_except );
116void float_raise( int );
117
118/*
119-------------------------------------------------------------------------------
120Software IEC/IEEE integer-to-floating-point conversion routines.
121-------------------------------------------------------------------------------
122*/
123float32 int32_to_float32( int );
124float64 int32_to_float64( int );

--- 191 unchanged lines hidden ---
117
118/*
119-------------------------------------------------------------------------------
120Software IEC/IEEE integer-to-floating-point conversion routines.
121-------------------------------------------------------------------------------
122*/
123float32 int32_to_float32( int );
124float64 int32_to_float64( int );

--- 191 unchanged lines hidden ---