Re: [Mingw-w64-public] InterlockedBitTestAndXXX
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
Re: [Mingw-w64-public] InterlockedBitTestAndXXX
On Tue, Jun 4, 2013 at 1:58 AM, dw limegreenso...@yahoo.com wrote: If you can prepare patches for your recent asm stuff against the stable branch, I would happily merge. It might make sense to hold off on this a bit. I have several more that I'm working on. OK, Also, I hate asking questions that expose my ignorance, but sometimes it's the only way to learn. So, what exactly are you referring to when you say the stable branch? Presumably some other svn? The trunk is the development version 3.x. e have stable v1.x and 2.x branches, see: http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/stable/ Those asm stuff should be identical between those two. dw -- O.S. -- 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
Re: [Mingw-w64-public] InterlockedBitTestAndXXX
patch is ok for apply. JonY could take care? (thanks i advance) Thanks Kai Am 02.06.2013 23:26 schrieb dw limegreenso...@yahoo.com: 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 interlockedbittestandcomplemen**t64. For these reasons (among others), I have created the attached patch. Specifically it includes: Fixes for: InterlockedBitTestAndSet, InterlockedBitTestAndReset, InterlockedBitTestAndComplemen**t, InterlockedBitTestAndSet64, InterlockedBitTestAndReset64, InterlockedBitTestAndComplemen**t64 _interlockedbittestandset, _interlockedbittestandreset, _** interlockedbittestandcomplemen**t _interlockedbittestandset64, _interlockedbittestandreset64, _** interlockedbittestandcomplemen**t64 - 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 interlockedbittestandcomplemen**t64. 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 -- 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 -- 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