On Mon, 31 Jul 2023, LIU Hao wrote:
They shall not be visible when targeting ARM or AArch64.
Hmm, if crosschecking the intended behaviour of these __MACHINE* macros
with MSVC's definitions, current versions of MSVC don't have any
__MACHINEI at all, they have __MACHINEX86_X64 with that purpose.
MSVC 2010 is the last one to have the __MACHINEI macro, where it indeed
was defined like this:
** __MACHINEI : Intel (32 bit x86) and X64
The one we're using here, __MACHINEX86X, doesn't exist in current versions
of MSVC either, but older ones have it defined like this:
** __MACHINEX86X : X86 Extended intrinsics
So I think we perhaps shouldn't extend the use of __MACHINEX86X, if
there's meant to be a difference between that and __MACHINEI. On the
other hand, newer MSVC styles don't distinguish between those two, so
perhaps it doesn't matter.
The most correct fix would probably be to make __MACHINEI a no-op for
non-x86 targets. (We could consider renaming __MACHINEI to
__MACHINEX86_X64 if we wanted to keep up with MSVC.) That carries a
notable risk of breaking something, as there's probably a bunch of
intrinsics declared with __MACHINEI that we might be relying on for arm
too.
I could try to prepare such a patch and test build some large codebases
for arm/aarch64 with it, to see if it seems safe or if some other
intrinsics need to be changed.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public