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.
This commit is contained in:
Vas Crabb 2021-09-24 06:51:51 +10:00
parent b2116467d6
commit 3a2ab1a6c6

View File

@ -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