1 /* $NetBSD: softfloat-for-gcc.h,v 1.9 2012/08/05 04:27:42 matt Exp $ */ 2 3 /* 4 * Move private identifiers with external linkage into implementation 5 * namespace. -- Klaus Klein <kleink@NetBSD.org>, May 5, 1999 6 */ 7 #define float_exception_flags _softfloat_float_exception_flags 8 #define float_exception_mask _softfloat_float_exception_mask 9 #define float_rounding_mode _softfloat_float_rounding_mode 10 #define float_raise _softfloat_float_raise 11 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 #define float128_eq _softfloat_float128_eq 20 #define float128_le _softfloat_float128_le 21 #define float128_lt _softfloat_float128_lt 22 23 /* 24 * Macros to define functions with the GCC expected names 25 */ 26 27 #define float32_add __addsf3 28 #define float64_add __adddf3 29 #define floatx80_add __addxf3 30 #define float128_add __addtf3 31 32 #define float32_sub __subsf3 33 #define float64_sub __subdf3 34 #define floatx80_sub __subxf3 35 #define float128_sub __subtf3 36 37 #define float32_mul __mulsf3 38 #define float64_mul __muldf3 39 #define floatx80_mul __mulxf3 40 #define float128_mul __multf3 41 42 #define float32_div __divsf3 43 #define float64_div __divdf3 44 #define floatx80_div __divxf3 45 #define float128_div __divtf3 46 47 #if 0 48 #define float32_neg __negsf2 49 #define float64_neg __negdf2 50 #define floatx80_neg __negxf2 51 #define float128_neg __negtf2 52 #endif 53 54 #define int32_to_float32 __floatsisf 55 #define int32_to_float64 __floatsidf 56 #define int32_to_floatx80 __floatsixf 57 #define int32_to_float128 __floatsitf 58 59 #define int64_to_float32 __floatdisf 60 #define int64_to_float64 __floatdidf 61 #define int64_to_floatx80 __floatdixf 62 #define int64_to_float128 __floatditf 63 64 #define int128_to_float32 __floattisf 65 #define int128_to_float64 __floattidf 66 #define int128_to_floatx80 __floattixf 67 #define int128_to_float128 __floattitf 68 69 #define uint32_to_float32 __floatunsisf 70 #define uint32_to_float64 __floatunsidf 71 #define uint32_to_floatx80 __floatunsixf 72 #define uint32_to_float128 __floatunsitf 73 74 #define uint64_to_float32 __floatundisf 75 #define uint64_to_float64 __floatundidf 76 #define uint64_to_floatx80 __floatundixf 77 #define uint64_to_float128 __floatunditf 78 79 #define uint128_to_float32 __floatuntisf 80 #define uint128_to_float64 __floatuntidf 81 #define uint128_to_floatx80 __floatuntixf 82 #define uint128_to_float128 __floatuntitf 83 84 #define float32_to_int32_round_to_zero __fixsfsi 85 #define float64_to_int32_round_to_zero __fixdfsi 86 #define floatx80_to_int32_round_to_zero __fixxfsi 87 #define float128_to_int32_round_to_zero __fixtfsi 88 89 #define float32_to_int64_round_to_zero __fixsfdi 90 #define float64_to_int64_round_to_zero __fixdfdi 91 #define floatx80_to_int64_round_to_zero __fixxfdi 92 #define float128_to_int64_round_to_zero __fixtfdi 93 94 #define float32_to_int128_round_to_zero __fixsfti 95 #define float64_to_int128_round_to_zero __fixdfti 96 #define floatx80_to_int128_round_to_zero __fixxfti 97 #define float128_to_int128_round_to_zero __fixtfti 98 99 #define float32_to_uint32_round_to_zero __fixunssfsi 100 #define float64_to_uint32_round_to_zero __fixunsdfsi 101 #define floatx80_to_uint32_round_to_zero __fixunsxfsi 102 #define float128_to_uint32_round_to_zero __fixunstfsi 103 104 #define float32_to_uint64_round_to_zero __fixunssfdi 105 #define float64_to_uint64_round_to_zero __fixunsdfdi 106 #define floatx80_to_uint64_round_to_zero __fixunsxfdi 107 #define float128_to_uint64_round_to_zero __fixunstfdi 108 109 #define float32_to_uint128_round_to_zero __fixunssfti 110 #define float64_to_uint128_round_to_zero __fixunsdfti 111 #define floatx80_to_uint128_round_to_zero __fixunsxfti 112 #define float128_to_uint128_round_to_zero __fixunstfti 113 114 #define float32_to_float64 __extendsfdf2 115 #define float32_to_floatx80 __extendsfxf2 116 #define float32_to_float128 __extendsftf2 117 #define float64_to_floatx80 __extenddfxf2 118 #define float64_to_float128 __extenddftf2 119 120 #define float128_to_float64 __trunctfdf2 121 #define floatx80_to_float64 __truncxfdf2 122 #define float128_to_float32 __trunctfsf2 123 #define floatx80_to_float32 __truncxfsf2 124 #define float64_to_float32 __truncdfsf2 125 126 #if 0 127 #define float32_cmp __cmpsf2 128 #define float32_unord __unordsf2 129 #define float32_eq __eqsf2 130 #define float32_ne __nesf2 131 #define float32_ge __gesf2 132 #define float32_lt __ltsf2 133 #define float32_le __lesf2 134 #define float32_gt __gtsf2 135 #endif 136 137 #if 0 138 #define float64_cmp __cmpdf2 139 #define float64_unord __unorddf2 140 #define float64_eq __eqdf2 141 #define float64_ne __nedf2 142 #define float64_ge __gedf2 143 #define float64_lt __ltdf2 144 #define float64_le __ledf2 145 #define float64_gt __gtdf2 146 #endif 147 148 /* XXX not in libgcc */ 149 #if 1 150 #define floatx80_cmp __cmpxf2 151 #define floatx80_unord __unordxf2 152 #define floatx80_eq __eqxf2 153 #define floatx80_ne __nexf2 154 #define floatx80_ge __gexf2 155 #define floatx80_lt __ltxf2 156 #define floatx80_le __lexf2 157 #define floatx80_gt __gtxf2 158 #endif 159 160 #if 0 161 #define float128_cmp __cmptf2 162 #define float128_unord __unordtf2 163 #define float128_eq __eqtf2 164 #define float128_ne __netf2 165 #define float128_ge __getf2 166 #define float128_lt __lttf2 167 #define float128_le __letf2 168 #define float128_gt __gttf2 169 #endif 170 171 #ifdef __ARM_EABI__ 172 #define __addsf3 __aeabi_fadd 173 #define __adddf3 __aeabi_dadd 174 175 #define __subsf3 __aeabi_fsub 176 #define __subdf3 __aeabi_dsub 177 178 #define __mulsf3 __aeabi_fmul 179 #define __muldf3 __aeabi_dmul 180 181 #define __divsf3 __aeabi_fdiv 182 #define __divdf3 __aeabi_ddiv 183 184 #define __floatsisf __aeabi_i2f 185 #define __floatsidf __aeabi_i2d 186 187 #define __floatdisf __aeabi_l2f 188 #define __floatdidf __aeabi_l2d 189 190 #define __floatunsisf __aeabi_ui2f 191 #define __floatunsidf __aeabi_ui2d 192 193 #define __floatundisf __aeabi_ul2f 194 #define __floatundidf __aeabi_ul2d 195 196 #define __fixsfsi __aeabi_f2iz 197 #define __fixdfsi __aeabi_d2iz 198 199 #define __fixsfdi __aeabi_f2lz 200 #define __fixdfdi __aeabi_d2lz 201 202 #define __fixunssfsi __aeabi_f2uiz 203 #define __fixunsdfsi __aeabi_d2uiz 204 205 #define __fixunssfdi __aeabi_f2ulz 206 #define __fixunsdfdi __aeabi_d2ulz 207 208 #define __extendsfdf2 __aeabi_f2d 209 #define __truncdfsf2 __aeabi_d2f 210 211 #define __eqsf2 __aeabi_fcmpeq 212 #define __eqdf2 __aeabi_dcmpeq 213 214 #define __ltsf2 __aeabi_fcmplt 215 #define __ltdf2 __aeabi_dcmplt 216 217 #define __lesf2 __aeabi_fcmple 218 #define __ledf2 __aeabi_dcmple 219 220 #define __gtsf2 __aeabi_fcmpgt 221 #define __gtdf2 __aeabi_dcmpgt 222 223 #define __gesf2 __aeabi_fcmpge 224 #define __gedf2 __aeabi_dcmpge 225 226 #endif /* __ARM_EABI__ */ 227