>> I think option #3 is that one I prefer too. Just one thing about >> SSE-instruction. For 64-bit we can assume that SSE has to be present >> in any case. Just for 32-bit we should check in headers for the >> __SSE__ macro, and in the intrinsic-function (none-inline) we should >> default to none-SSE version. > __SSE__ should always be defined with x86_64 so just checking for > __SSE__ might be simpler and will give the fastest version. > > Thus the same definition could be used for both inline and intrinsic.
Per MS docs, __faststorefence is only defined for x64. While I assume it would work, the current winnt.h doesn't define it for x86 and I wasn't planning to add it. Being able to just assume that __SSE__ is defined certainly makes the code cleaner. The reason I didn't was that it is possible that someone could be compiling with -mno-sse for some reason. Ignore this? There is a similar question for MemoryBarrier(). The mfence instruction is SSE2. Check for __SSE2__ or not? dw ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public