2009-03-18 02:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbatomic.h
    ! fixed inline assembler code for atomic inc/dec operations.
      It's late and I haven't wrote anything in assembler using
      Intel syntax for years.
    * reenabled inline assembler code for atomic inc/dec operations
      for POCC/XCC builds - such version should work. Please check.
This commit is contained in:
Przemyslaw Czerpak
2009-03-18 01:16:35 +00:00
parent 111895ba2b
commit 7771bb4673
2 changed files with 18 additions and 3 deletions

View File

@@ -8,6 +8,19 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-03-18 02:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbatomic.h
! fixed inline assembler code for atomic inc/dec operations.
It's late and I haven't wrote anything in assembler using
Intel syntax for years.
* reenabled inline assembler code for atomic inc/dec operations
for POCC/XCC builds - such version should work. Please check.
2009-03-18 01:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/utils/hbtest/rt_hvma.prg
* use #pragma -ko- / #pragma -ko+ to make 3 RTE messages clipper
compatible
2009-03-18 01:04 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/hbatomic.h
! Typo (__inline__ -> __inline).

View File

@@ -258,7 +258,7 @@ HB_EXTERN_BEGIN
# endif /* ???CPU?? */
#elif defined( _MSC_VER ) && ! defined( __POCC__ ) && ! defined( __XCC__ )
#elif defined( _MSC_VER )
# if defined( i386 ) || defined( __i386__ ) || defined( __x86_64__ ) || \
defined( _M_IX86 ) || defined( _M_AMD64 )
@@ -267,14 +267,16 @@ HB_EXTERN_BEGIN
static __inline void hb_atomic_inc32( volatile int * p )
{
__asm lock inc p
__asm mov eax, p
__asm lock inc dword ptr [eax]
}
static __inline int hb_atomic_dec32( volatile int * p )
{
unsigned char c;
__asm lock dec p
__asm mov eax, p
__asm lock dec dword ptr [eax]
__asm setne c
return c;