2013/6/4 dw <limegreenso...@yahoo.com>:
>
>>> 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.

That's a fair point.

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

I think we should ignore that somebody uses -mno-sse for x64.  First
this would be clearly an ABI-breakage, due SSE is mandatory in
calling-convention.  And secondly, on x64 CPUs base SSE feature-sets
we can assume always.

> There is a similar question for MemoryBarrier().  The mfence instruction
> is SSE2.  Check for __SSE2__ or not?

Well, not sure here.  AFAIR is SSE2 present for all more modern x64
CPUs, but well, here this check might make sense.

> dw

Kai

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

Reply via email to