> Code looks ok. I have no objections.
So far so good then. But I do have a question.
In Winnt.h, there is code like this:
#ifdef __CYGWIN__
# if defined(__cplusplus)
extern "C" {
# endif
# include <x86intrin.h>
# if defined(__cplusplus)
}
# endif
#else /* !__CYGWIN__ */
# include <intrin.h>
#endif /* __CYGWIN__ */
Since all the intrinsics are already defined in intrin.h, they don't
need to be defined again in winnt.h. UNLESS, cygwin is defined, which
skips intrin.h. So, I was merrily moving the intrinsic definitions that
are already in winnt.h up into the cygwin-only part of the #if, when I
realized something odd: This #if block is only in place for __x86_64,
not for _X86_. Given how instrinsics work in MSVC, this seems a little odd.
As I consider how I want to deal with this, I DON'T want to just copy
the entire block from the x64 to the x86. It's bad enough we are
duplicating these definitions without triplicating them. Since MSVC's
winnt.h doesn't #include intrin.h at all, I (briefly) considered
removing it from this file as well. But it seemed too likely to create
compatibility issues.
So, unless someone gives me a reason to do something else, I intend to
move this block (and all of the winnt.h intrinsics I've added to it) up
out of the x64 #if block, so it will apply to both x86 and x64.
I have modified the other intrinsics for which I have recently submitted
patches to use this approach.
It all compiles, but I'm doing more testing before I'll be ready to
share it.
dw
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public