File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 27
27
//
28
28
// ===----------------------------------------------------------------------===//
29
29
30
- #if defined(__x86_64__) && !defined(__APPLE__)
30
+ // Android NDK <r21 do not provide `__aeabi_d2h` in the compiler runtime,
31
+ // provide shims in that case.
32
+ #if (defined(ANDROID) && defined(__ARM_ARCH_7A__) && defined(__ARM_EABI__)) || \
33
+ (defined(__x86_64__) && !defined(__APPLE__))
31
34
32
35
#include " ../SwiftShims/Visibility.h"
33
36
@@ -45,7 +48,7 @@ static float fromEncoding(unsigned int e) {
45
48
return f;
46
49
}
47
50
48
- #if defined __F16C__
51
+ #if defined(__x86_64__) && defined( __F16C__)
49
52
50
53
// If we're compiling the runtime for a target that has the conversion
51
54
// instruction, we might as well just use those. In theory, we'd also be
@@ -161,4 +164,10 @@ SWIFT_RUNTIME_EXPORT unsigned short __truncdfhf2(double d) {
161
164
return __gnu_f2h_ieee (f);
162
165
}
163
166
167
+ #if defined(__ARM_EABI__)
168
+ SWIFT_RUNTIME_EXPORT unsigned short __aeabi_d2h (double d) {
169
+ return __truncdfhf2 (d);
170
+ }
171
+ #endif
172
+
164
173
#endif // defined(__x86_64__) && !defined(__APPLE__)
You can’t perform that action at this time.
0 commit comments