1 /*
2 * Copyright (c) 2021 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/kernel.h>
8 #include <zephyr/toolchain.h>
9
10 /**
11 * @file
12 * @brief Provide soft float function stubs for long double operations.
13 *
14 * GCC soft float does not support long double so these need to be
15 * stubbed out.
16 *
17 * The function names come from the GCC public documentation.
18 */
19
20 extern void abort(void);
21
__addtf3(long double a,long double b)22 __weak void __addtf3(long double a, long double b)
23 {
24 k_oops();
25 }
26
__addxf3(long double a,long double b)27 __weak void __addxf3(long double a, long double b)
28 {
29 k_oops();
30 }
31
__subtf3(long double a,long double b)32 __weak void __subtf3(long double a, long double b)
33 {
34 k_oops();
35 }
36
__subxf3(long double a,long double b)37 __weak void __subxf3(long double a, long double b)
38 {
39 k_oops();
40 }
41
__multf3(long double a,long double b)42 __weak void __multf3(long double a, long double b)
43 {
44 k_oops();
45 }
46
__mulxf3(long double a,long double b)47 __weak void __mulxf3(long double a, long double b)
48 {
49 k_oops();
50 }
51
__divtf3(long double a,long double b)52 __weak void __divtf3(long double a, long double b)
53 {
54 k_oops();
55 }
56
__divxf3(long double a,long double b)57 __weak void __divxf3(long double a, long double b)
58 {
59 k_oops();
60 }
61
__negtf2(long double a)62 __weak void __negtf2(long double a)
63 {
64 k_oops();
65 }
66
__negxf2(long double a)67 __weak void __negxf2(long double a)
68 {
69 k_oops();
70 }
71
__extendsftf2(float a)72 __weak void __extendsftf2(float a)
73 {
74 k_oops();
75 }
76
__extendsfxf2(float a)77 __weak void __extendsfxf2(float a)
78 {
79 k_oops();
80 }
81
__extenddftf2(double a)82 __weak void __extenddftf2(double a)
83 {
84 k_oops();
85 }
86
__extenddfxf2(double a)87 __weak void __extenddfxf2(double a)
88 {
89 k_oops();
90 }
91
__truncxfdf2(long double a)92 __weak void __truncxfdf2(long double a)
93 {
94 k_oops();
95 }
96
__trunctfdf2(long double a)97 __weak void __trunctfdf2(long double a)
98 {
99 k_oops();
100 }
101
__truncxfsf2(long double a)102 __weak void __truncxfsf2(long double a)
103 {
104 k_oops();
105 }
106
__trunctfsf2(long double a)107 __weak void __trunctfsf2(long double a)
108 {
109 k_oops();
110 }
111
__fixtfsi(long double a)112 __weak void __fixtfsi(long double a)
113 {
114 k_oops();
115 }
116
__fixxfsi(long double a)117 __weak void __fixxfsi(long double a)
118 {
119 k_oops();
120 }
121
__fixtfdi(long double a)122 __weak void __fixtfdi(long double a)
123 {
124 k_oops();
125 }
126
__fixxfdi(long double a)127 __weak void __fixxfdi(long double a)
128 {
129 k_oops();
130 }
131
__fixtfti(long double a)132 __weak void __fixtfti(long double a)
133 {
134 k_oops();
135 }
136
__fixxfti(long double a)137 __weak void __fixxfti(long double a)
138 {
139 k_oops();
140 }
141
__fixunstfsi(long double a)142 __weak void __fixunstfsi(long double a)
143 {
144 k_oops();
145 }
146
__fixunsxfsi(long double a)147 __weak void __fixunsxfsi(long double a)
148 {
149 k_oops();
150 }
151
__fixunstfdi(long double a)152 __weak void __fixunstfdi(long double a)
153 {
154 k_oops();
155 }
156
__fixunsxfdi(long double a)157 __weak void __fixunsxfdi(long double a)
158 {
159 k_oops();
160 }
161
__fixunstfti(long double a)162 __weak void __fixunstfti(long double a)
163 {
164 k_oops();
165 }
166
__fixunsxfti(long double a)167 __weak void __fixunsxfti(long double a)
168 {
169 k_oops();
170 }
171
__floatsitf(int i)172 __weak void __floatsitf(int i)
173 {
174 k_oops();
175 }
176
__floatsixf(int i)177 __weak void __floatsixf(int i)
178 {
179 k_oops();
180 }
181
__floatditf(long i)182 __weak void __floatditf(long i)
183 {
184 k_oops();
185 }
186
__floatdixf(long i)187 __weak void __floatdixf(long i)
188 {
189 k_oops();
190 }
191
__floattitf(long long i)192 __weak void __floattitf(long long i)
193 {
194 k_oops();
195 }
196
__floattixf(long long i)197 __weak void __floattixf(long long i)
198 {
199 k_oops();
200 }
201
__floatunsitf(unsigned int i)202 __weak void __floatunsitf(unsigned int i)
203 {
204 k_oops();
205 }
206
__floatunsixf(unsigned int i)207 __weak void __floatunsixf(unsigned int i)
208 {
209 k_oops();
210 }
211
__floatunditf(unsigned long i)212 __weak void __floatunditf(unsigned long i)
213 {
214 k_oops();
215 }
216
__floatundixf(unsigned long i)217 __weak void __floatundixf(unsigned long i)
218 {
219 k_oops();
220 }
221
__floatuntitf(unsigned long long i)222 __weak void __floatuntitf(unsigned long long i)
223 {
224 k_oops();
225 }
226
__floatuntixf(unsigned long long i)227 __weak void __floatuntixf(unsigned long long i)
228 {
229 k_oops();
230 }
231
__cmptf2(long double a,long double b)232 __weak void __cmptf2(long double a, long double b)
233 {
234 k_oops();
235 }
236
__unordtf2(long double a,long double b)237 __weak void __unordtf2(long double a, long double b)
238 {
239 k_oops();
240 }
241
__eqtf2(long double a,long double b)242 __weak void __eqtf2(long double a, long double b)
243 {
244 k_oops();
245 }
246
__netf2(long double a,long double b)247 __weak void __netf2(long double a, long double b)
248 {
249 k_oops();
250 }
251
__getf2(long double a,long double b)252 __weak void __getf2(long double a, long double b)
253 {
254 k_oops();
255 }
256
__lttf2(long double a,long double b)257 __weak void __lttf2(long double a, long double b)
258 {
259 k_oops();
260 }
261
__letf2(long double a,long double b)262 __weak void __letf2(long double a, long double b)
263 {
264 k_oops();
265 }
266
__gttf2(long double a,long double b)267 __weak void __gttf2(long double a, long double b)
268 {
269 k_oops();
270 }
271
__powitf2(long double a,int b)272 __weak void __powitf2(long double a, int b)
273 {
274 k_oops();
275 }
276
__powixf2(long double a,int b)277 __weak void __powixf2(long double a, int b)
278 {
279 k_oops();
280 }
281