From 3a2ab1a6c6238aa2c027651ec854ade488034d43 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 24 Sep 2021 06:51:51 +1000 Subject: util/delegate.h: Use "compatible" delegates for MinGW GCC i686. The Itanium delegate has questionable value on on MinGW i686 as it injects a conditional branch in the hot path for delegates anyway to deal with the different __thiscall convention. It's somehow breaking and causing memory corruption in full builds, but I don't have the time to work out exactly which delegate type is the problematic one, especially not with a release coming soon. This will probably cause 32-bit MinGW builds to become substantially larger. --- src/lib/util/delegate.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h index 223467d2fbc..609b6667bfc 100644 --- a/src/lib/util/delegate.h +++ b/src/lib/util/delegate.h @@ -141,9 +141,10 @@ #elif defined(__GNUC__) // 32bit MINGW asks for different convention #if defined(__MINGW32__) && !defined(__x86_64__) && defined(__i386__) - #define MAME_DELEGATE_USE_TYPE MAME_DELEGATE_TYPE_ITANIUM - #define MAME_DELEGATE_MEMBER_ABI __thiscall - #define MAME_DELEGATE_DIFFERENT_MEMBER_ABI 1 + #define MAME_DELEGATE_USE_TYPE MAME_DELEGATE_TYPE_COMPATIBLE + //#define MAME_DELEGATE_USE_TYPE MAME_DELEGATE_TYPE_ITANIUM + //#define MAME_DELEGATE_MEMBER_ABI __thiscall + //#define MAME_DELEGATE_DIFFERENT_MEMBER_ABI 1 #elif defined(__clang__) && defined(__i386__) && defined(_WIN32) #define MAME_DELEGATE_USE_TYPE MAME_DELEGATE_TYPE_COMPATIBLE #else -- cgit v1.2.3