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