crt: Introduce F_ARM_NATIVE
And use it for exports not available on ARM64EC: fabsf, RtlUlongByteSwap,
RtlUlonglongByteSwap and RtlUshortByteSwap.
fabs was present in early CRT versions up to 10.0.22000.2057, but was dropped
in 10.0.22621.3593.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
diff --git a/mingw-w64-crt/def-include/func.def.in b/mingw-w64-crt/def-include/func.def.in
index f180b9c..c1327d7 100644
--- a/mingw-w64-crt/def-include/func.def.in
+++ b/mingw-w64-crt/def-include/func.def.in
@@ -30,14 +30,14 @@
#elif defined(__arm__)
#define F32(x) x
#define F_ARM32(x) x
-#define F_ARM_ANY(x) x
+#define F_ARM_NATIVE(x) x
#define F_NON_I386(x) x
#define F_NON_X64(x) x
#define F_NON_ARM64(x) x
#elif defined(__aarch64__)
#define F64(x) x
#define F_ARM64(x) x
-#define F_ARM_ANY(x) x
+#define F_ARM_NATIVE(x) x
#define F_NON_I386(x) x
#define F_NON_X64(x) x
#else
@@ -59,8 +59,11 @@
#ifndef F_X64
#define F_X64(x)
#endif
+#ifndef F_ARM_NATIVE
+#define F_ARM_NATIVE(x)
+#endif
#ifndef F_ARM_ANY
-#define F_ARM_ANY(x)
+#define F_ARM_ANY(x) F_ARM_NATIVE(x)
#endif
#ifndef F_ARM32
#define F_ARM32(x)
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
index 33b4f37..17446e5 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
@@ -266,7 +266,7 @@
expm1f
F_LD64(expm1l) ; Can't use long double functions from the CRT on x86
fabs
-F_ARM_ANY(fabsf)
+F_ARM_NATIVE(fabsf)
fdim
fdimf
F_LD64(fdiml) ; Can't use long double functions from the CRT on x86
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in
index ab7eeed..88c6863 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1862,7 +1862,7 @@
F_ARM_ANY(_get_current_locale) ; i386 and x64 _get_current_locale replaced by emu
F_ARM_ANY(_memcpy_strict_align)
_wcstod_l
-F_ARM_ANY(fabsf) ; i386 and x64 fabsf provided by emu
+F_ARM_NATIVE(fabsf) ; i386 and x64 fabsf provided by emu
; These symbols were added in Windows 8.1 OS system version of msvcrt.dll
F_I386(_CallMemberFunction0@8)
diff --git a/mingw-w64-crt/lib-common/ntdll.def.in b/mingw-w64-crt/lib-common/ntdll.def.in
index efa6145..2ce55ce 100644
--- a/mingw-w64-crt/lib-common/ntdll.def.in
+++ b/mingw-w64-crt/lib-common/ntdll.def.in
@@ -1643,8 +1643,8 @@
RtlUTF8ToUnicodeN
RtlUdiv128
F_X64(RtlUmsThreadYield)
-F_ARM_ANY(RtlUlongByteSwap)
-F_ARM_ANY(RtlUlonglongByteSwap)
+F_ARM_NATIVE(RtlUlongByteSwap)
+F_ARM_NATIVE(RtlUlonglongByteSwap)
RtlUnhandledExceptionFilter
RtlUnhandledExceptionFilter2
RtlUnicodeStringToAnsiSize
@@ -1690,7 +1690,7 @@
F_X86_ANY(RtlUsageHeap)
RtlUserFiberStart
RtlUserThreadStart
-F_ARM_ANY(RtlUshortByteSwap)
+F_ARM_NATIVE(RtlUshortByteSwap)
RtlValidAcl
RtlValidProcessProtection
RtlValidRelativeSecurityDescriptor
diff --git a/mingw-w64-crt/lib-common/ucrtbase-common.def.in b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
index 24f47bc..90a0993 100644
--- a/mingw-w64-crt/lib-common/ucrtbase-common.def.in
+++ b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
@@ -1656,7 +1656,7 @@
F_LD64(_o_exp2l) ; Can't use long double functions from the CRT on x86
F_NON_I386(_o_expf)
_o_fabs
-F_ARM_ANY(_o_fabsf)
+F_ARM_NATIVE(_o_fabsf)
_o_fclose
_o_feof
_o_ferror
@@ -2338,7 +2338,7 @@
expm1f
F_LD64(expm1l) ; Can't use long double functions from the CRT on x86
fabs
-F_ARM_ANY(fabsf)
+F_ARM_NATIVE(fabsf)
fclose
fdim
fdimf