1 /*	$OpenBSD: softfloat-for-gcc.h,v 1.3 2022/09/10 06:48:31 miod Exp $	*/
2 /* $NetBSD: softfloat-for-gcc.h,v 1.6 2003/07/26 19:24:51 salo Exp $ */
3 
4 /*
5  * Move private identifiers with external linkage into implementation
6  * namespace.  -- Klaus Klein <kleink@NetBSD.org>, May 5, 1999
7  */
8 #define float_exception_flags	_softfloat_float_exception_flags
9 #define float_exception_mask	_softfloat_float_exception_mask
10 #define float_rounding_mode	_softfloat_float_rounding_mode
11 #define float_raise		_softfloat_float_raise
12 /* The following batch are called by GCC through wrappers */
13 #define float32_eq		_softfloat_float32_eq
14 #define float32_le		_softfloat_float32_le
15 #define float32_lt		_softfloat_float32_lt
16 #define float64_eq		_softfloat_float64_eq
17 #define float64_le		_softfloat_float64_le
18 #define float64_lt		_softfloat_float64_lt
19 
20 /*
21  * Macros to define functions with the GCC expected names
22  */
23 
24 #define float32_add			__addsf3
25 #define float64_add			__adddf3
26 #define float32_sub			__subsf3
27 #define float64_sub			__subdf3
28 #define float32_mul			__mulsf3
29 #define float64_mul			__muldf3
30 #define float32_div			__divsf3
31 #define float64_div			__divdf3
32 #define int32_to_float32		__floatsisf
33 #define int32_to_float64		__floatsidf
34 #define int64_to_float32		__floatdisf
35 #define int64_to_float64		__floatdidf
36 #define float32_to_int32_round_to_zero	__fixsfsi
37 #define float64_to_int32_round_to_zero	__fixdfsi
38 #define float32_to_int64_round_to_zero	__fixsfdi
39 #define float64_to_int64_round_to_zero	__fixdfdi
40 #define float32_to_uint32_round_to_zero	__fixunssfsi
41 #define float64_to_uint32_round_to_zero	__fixunsdfsi
42 #define float32_to_float64		__extendsfdf2
43 #define float64_to_float32		__truncdfsf2
44 
45 #ifdef __ARM_EABI__
46 __strong_alias(__aeabi_fadd, __addsf3);
47 __strong_alias(__aeabi_dadd, __adddf3);
48 __strong_alias(__aeabi_fsub, __subsf3);
49 __strong_alias(__aeabi_dsub, __subdf3);
50 __strong_alias(__aeabi_fmul, __mulsf3);
51 __strong_alias(__aeabi_dmul, __muldf3);
52 __strong_alias(__aeabi_fdiv, __divsf3);
53 __strong_alias(__aeabi_ddiv, __divdf3);
54 __strong_alias(__aeabi_i2f, __floatsisf);
55 __strong_alias(__aeabi_i2d, __floatsidf);
56 __strong_alias(__aeabi_l2f, __floatdisf);
57 __strong_alias(__aeabi_l2d, __floatdidf);
58 __strong_alias(__aeabi_f2iz, __fixsfsi);
59 __strong_alias(__aeabi_d2iz, __fixdfsi);
60 __strong_alias(__aeabi_f2lz, __fixsfdi);
61 __strong_alias(__aeabi_d2lz, __fixdfdi);
62 __strong_alias(__aeabi_f2uiz, __fixunssfsi);
63 __strong_alias(__aeabi_d2uiz, __fixunsdfsi);
64 __strong_alias(__aeabi_f2ulz, __fixunssfdi);
65 __strong_alias(__aeabi_d2ulz, __fixunsdfdi);
66 __strong_alias(__aeabi_f2d, __extendsfdf2);
67 __strong_alias(__aeabi_d2f, __truncdfsf2);
68 #endif
69