On Mon, Jun 3, 2013 at 12:26 AM, dw <limegreenso...@yahoo.com> wrote:
> I have found some problems with the InterlockedBitTestAndXXX functions.  For
> example:
>
> - Despite sezero's recent update, they still don't all have the "memory"
> clobber.
> - The constraints for the 64bit versions are incorrect (I vs J).
> - There is no library definition for interlockedbittestandcomplement64.
>
> For these reasons (among others), I have created the attached patch.
> Specifically it includes:
>
> Fixes for:
> InterlockedBitTestAndSet, InterlockedBitTestAndReset,
> InterlockedBitTestAndComplement,
> InterlockedBitTestAndSet64, InterlockedBitTestAndReset64,
> InterlockedBitTestAndComplement64
> _interlockedbittestandset, _interlockedbittestandreset,
> _interlockedbittestandcomplement
> _interlockedbittestandset64, _interlockedbittestandreset64,
> _interlockedbittestandcomplement64
>
> - While sezero recently added the (required) "memory" clobber to a number of
> the InterlockedBitTestXXX methods, he didn't get all of them.  Using the
> macro for defining these methods makes them all consistent.
> - The Bit parameter uses the "I" constraint on both 32bit and 64bit.  64bit
> should use "J".
> - Use symbolic names for asm statement for clarity.
> - Support both att and intel dialects of assembler in public headers.
> - InterlockedBitTestAndSet and _interlockedbittestandset were mapped to each
> other via #define.  However they should have different prototypes.  This
> patch declares InterlockedBitTestAndSet (and related) with p1 as volatile,
> which is consistent with the MSVC definition.  In the crt, these are
> implemented with 'alias.'  The inlines both use the same macro.
> - Adds declarations for all methods in intrin.h.
> - There was no library definition for interlockedbittestandcomplement64.
> This required a new file.
> - As with my other recent patches, this one uses macros so all
> implementations (winnt.h and crt) use the same code.
>
> Cleanup:
> - My previous patches have been using the cpp comment style (//).  I have
> replaced that with c style (/* */) to be consistent with the rest of the
> file.
> - I have renamed the file macro for intrin-mac.h from _INTRIN-MAC_ to
> _INTRIN_MAC_.  I'm not sure why this ever worked.
> - I have added comments to intrin-mac.h describing the parameters for the
> macros from previous patches.
>
> dw

If you can prepare patches for your recent asm stuff against the
stable branch, I would happily merge.

--
O.S.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to