xref: /minix3/lib/libc/arch/sparc64/softfloat/softfloat-qp.h (revision 2fe8fb192fe7e8720e3e7a77f928da545e872a6a)
1*2fe8fb19SBen Gras /*
2*2fe8fb19SBen Gras  * Get everything SOFTFLOAT_FOR_GCC normally would rename out of the users
3*2fe8fb19SBen Gras  * namespace. Much of this isn't used but to avoid dissecting softloat.c
4*2fe8fb19SBen Gras  * all of it is pulled in even for just the _Qp* case
5*2fe8fb19SBen Gras  */
6*2fe8fb19SBen Gras 
7*2fe8fb19SBen Gras #if defined(SOFTFLOATSPARC64_FOR_GCC) && !defined(SOFTFLOAT_FOR_GCC)
8*2fe8fb19SBen Gras #define float_exception_flags   _softfloat_float_exception_flags
9*2fe8fb19SBen Gras #define float_rounding_mode     _softfloat_float_rounding_mode
10*2fe8fb19SBen Gras #define float_raise             _softfloat_float_raise
11*2fe8fb19SBen Gras 
12*2fe8fb19SBen Gras #define float32_eq              _softfloat_float32_eq
13*2fe8fb19SBen Gras #define float32_le              _softfloat_float32_le
14*2fe8fb19SBen Gras #define float32_lt              _softfloat_float32_lt
15*2fe8fb19SBen Gras #define float64_eq              _softfloat_float64_eq
16*2fe8fb19SBen Gras #define float64_le              _softfloat_float64_le
17*2fe8fb19SBen Gras #define float64_lt              _softfloat_float64_lt
18*2fe8fb19SBen Gras 
19*2fe8fb19SBen Gras #define float32_add			_softfloat_float32_add
20*2fe8fb19SBen Gras #define float64_add			_softfloat_float64_add
21*2fe8fb19SBen Gras #define float32_sub			_softfloat_float32_sub
22*2fe8fb19SBen Gras #define float64_sub			_softfloat_float64_sub
23*2fe8fb19SBen Gras #define float32_mul			_softfloat_float32_mul
24*2fe8fb19SBen Gras #define float64_mul			_softfloat_float64_mul
25*2fe8fb19SBen Gras #define float32_div			_softfloat_float32_div
26*2fe8fb19SBen Gras #define float64_div			_softfloat_float64_div
27*2fe8fb19SBen Gras #define int32_to_float32		_softfloat_int32_to_float32
28*2fe8fb19SBen Gras #define int32_to_float64		_softfloat_int32_to_float64
29*2fe8fb19SBen Gras #define int64_to_float32		_softfloat_int64_to_float32
30*2fe8fb19SBen Gras #define int64_to_float64		_softfloat_int64_to_float64
31*2fe8fb19SBen Gras #define float32_to_int32_round_to_zero	_softfloat_float32_to_int32_round_to_zero
32*2fe8fb19SBen Gras #define float64_to_int32_round_to_zero	_softfloat_float64_to_int32_round_to_zero
33*2fe8fb19SBen Gras #define float32_to_int64_round_to_zero	_softfloat_float32_to_int64_round_to_zero
34*2fe8fb19SBen Gras #define float64_to_int64_round_to_zero	_softfloat_float64_to_int64_round_to_zero
35*2fe8fb19SBen Gras #define float32_to_uint32_round_to_zero	_softfloat_float32_to_uint32_round_to_zero
36*2fe8fb19SBen Gras #define float64_to_uint32_round_to_zero	_softfloat_float64_to_uint32_round_to_zero
37*2fe8fb19SBen Gras #define float32_to_float64		_softfloat_float32_to_float64
38*2fe8fb19SBen Gras #define float64_to_float32		_softfloat_float64_to_float32
39*2fe8fb19SBen Gras #define float32_is_signaling_nan	_softfloat_float32_is_signaling_nan
40*2fe8fb19SBen Gras #define float64_is_signaling_nan	_softfloat_float64_is_signaling_nan
41*2fe8fb19SBen Gras 
42*2fe8fb19SBen Gras #endif /* SOFTFLOATSPARC64_FOR_GCC and !SOFTFLOAT_FOR_GCC */
43*2fe8fb19SBen Gras 
44*2fe8fb19SBen Gras /*
45*2fe8fb19SBen Gras  * The following will always end up in the namespace if FLOAT128 is
46*2fe8fb19SBen Gras  * defined and SOFTFLOAT_FOR_GCC isn't. So rename them out of the user's
47*2fe8fb19SBen Gras  * namespace.
48*2fe8fb19SBen Gras  */
49*2fe8fb19SBen Gras 
50*2fe8fb19SBen Gras #ifdef SOFTFLOATSPARC64_FOR_GCC
51*2fe8fb19SBen Gras #define	float128_add			_softfloat_float128_add
52*2fe8fb19SBen Gras #define	float128_div			_softfloat_float128_div
53*2fe8fb19SBen Gras #define	float128_eq			_softfloat_float128_eq
54*2fe8fb19SBen Gras #define	float128_eq_signaling		_softfloat_float128_eq_signaling
55*2fe8fb19SBen Gras #define	float128_is_nan			_softfloat_float128_is_nan
56*2fe8fb19SBen Gras #define	float128_is_signaling_nan	_softfloat_float128_is_signaling_nan
57*2fe8fb19SBen Gras #define	float128_le			_softfloat_float128_le
58*2fe8fb19SBen Gras #define	float128_le_quiet		_softfloat_float128_le_quiet
59*2fe8fb19SBen Gras #define	float128_lt			_softfloat_float128_lt
60*2fe8fb19SBen Gras #define	float128_lt_quiet		_softfloat_float128_lt_quiet
61*2fe8fb19SBen Gras #define	float128_mul			_softfloat_float128_mul
62*2fe8fb19SBen Gras #define	float128_rem			_softfloat_float128_rem
63*2fe8fb19SBen Gras #define	float128_round_to_int		_softfloat_float128_round_to_int
64*2fe8fb19SBen Gras #define	float128_sqrt			_softfloat_float128_sqrt
65*2fe8fb19SBen Gras #define	float128_sub			_softfloat_float128_sub
66*2fe8fb19SBen Gras #define	float128_to_float32		_softfloat_float128_to_float32
67*2fe8fb19SBen Gras #define	float128_to_float64		_softfloat_float128_to_float64
68*2fe8fb19SBen Gras #define	float128_to_int32		_softfloat_float128_to_int32
69*2fe8fb19SBen Gras #define	float128_to_int32_round_to_zero	_softfloat_float128_to_int32_round_to_zero
70*2fe8fb19SBen Gras #define	float128_to_int64		_softfloat_float128_to_int64
71*2fe8fb19SBen Gras #define	float128_to_int64_round_to_zero	_softfloat_float128_to_int64_round_to_zero
72*2fe8fb19SBen Gras #define	float128_to_uint64_round_to_zero	_softfloat_float128_to_uint64_round_to_zero
73*2fe8fb19SBen Gras #define	float32_to_float128		_softfloat_float32_to_float128
74*2fe8fb19SBen Gras #define	float64_to_float128		_softfloat_float64_to_float128
75*2fe8fb19SBen Gras #define	int32_to_float128		_softfloat_int32_to_float128
76*2fe8fb19SBen Gras #define	int64_to_float128		_softfloat_int64_to_float128
77*2fe8fb19SBen Gras 
78*2fe8fb19SBen Gras /*
79*2fe8fb19SBen Gras  * If this isn't defined go ahead and set it now since this is now past
80*2fe8fb19SBen Gras  * anywhere define's are happening and this will conditionally compile out
81*2fe8fb19SBen Gras  * a lot of extraneous code in softfloat.c
82*2fe8fb19SBen Gras  */
83*2fe8fb19SBen Gras 
84*2fe8fb19SBen Gras #ifndef SOFTFLOAT_FOR_GCC
85*2fe8fb19SBen Gras #define SOFTFLOAT_FOR_GCC
86*2fe8fb19SBen Gras #endif
87*2fe8fb19SBen Gras 
88*2fe8fb19SBen Gras #endif /* SOFTFLOATSPARC64_FOR_GCC */
89