From: Martin Storsjö martin@martin.st
Change __MINGW32__ ifdefs to _WIN32; in compiler-rt builtins, these functions are only needed for mingw targets, as the functions are expected to be provided by MSVC libraries in MSVC builds.
When used in Wine, these files are needed specifically to fulfill that role in MSVC mode builds, so generalize the ifdefs. --- libs/compiler-rt/arm/aeabi_idivmod.S | 4 ++-- libs/compiler-rt/arm/aeabi_ldivmod.S | 4 ++-- libs/compiler-rt/arm/aeabi_uidivmod.S | 4 ++-- libs/compiler-rt/arm/aeabi_uldivmod.S | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libs/compiler-rt/arm/aeabi_idivmod.S b/libs/compiler-rt/arm/aeabi_idivmod.S index 9c9c80ab5a7..dadffb3ca87 100644 --- a/libs/compiler-rt/arm/aeabi_idivmod.S +++ b/libs/compiler-rt/arm/aeabi_idivmod.S @@ -15,7 +15,7 @@ // return {quot, rem}; // }
-#if defined(__MINGW32__) +#if defined(_WIN32) #define __aeabi_idivmod __rt_sdiv #endif
@@ -35,7 +35,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod) push { lr } sub sp, sp, #4 mov r2, sp -#if defined(__MINGW32__) +#if defined(_WIN32) mov r3, r0 mov r0, r1 mov r1, r3 diff --git a/libs/compiler-rt/arm/aeabi_ldivmod.S b/libs/compiler-rt/arm/aeabi_ldivmod.S index 038ae5d723a..ca47e42cf15 100644 --- a/libs/compiler-rt/arm/aeabi_ldivmod.S +++ b/libs/compiler-rt/arm/aeabi_ldivmod.S @@ -16,7 +16,7 @@ // return {quot, rem}; // }
-#if defined(__MINGW32__) +#if defined(_WIN32) #define __aeabi_ldivmod __rt_sdiv64 #endif
@@ -27,7 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod) sub sp, sp, #16 add r6, sp, #8 str r6, [sp] -#if defined(__MINGW32__) +#if defined(_WIN32) movs r6, r0 movs r0, r2 movs r2, r6 diff --git a/libs/compiler-rt/arm/aeabi_uidivmod.S b/libs/compiler-rt/arm/aeabi_uidivmod.S index 88a4a6d8bc1..06462c9cf35 100644 --- a/libs/compiler-rt/arm/aeabi_uidivmod.S +++ b/libs/compiler-rt/arm/aeabi_uidivmod.S @@ -16,7 +16,7 @@ // return {quot, rem}; // }
-#if defined(__MINGW32__) +#if defined(_WIN32) #define __aeabi_uidivmod __rt_udiv #endif
@@ -42,7 +42,7 @@ LOCAL_LABEL(case_denom_larger): push { lr } sub sp, sp, #4 mov r2, sp -#if defined(__MINGW32__) +#if defined(_WIN32) mov r3, r0 mov r0, r1 mov r1, r3 diff --git a/libs/compiler-rt/arm/aeabi_uldivmod.S b/libs/compiler-rt/arm/aeabi_uldivmod.S index be343b6bc82..689a54ce1ee 100644 --- a/libs/compiler-rt/arm/aeabi_uldivmod.S +++ b/libs/compiler-rt/arm/aeabi_uldivmod.S @@ -16,7 +16,7 @@ // return {quot, rem}; // }
-#if defined(__MINGW32__) +#if defined(_WIN32) #define __aeabi_uldivmod __rt_udiv64 #endif
@@ -27,7 +27,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod) sub sp, sp, #16 add r6, sp, #8 str r6, [sp] -#if defined(__MINGW32__) +#if defined(_WIN32) movs r6, r0 movs r0, r2 movs r2, r6