Re[2]: [Gc] libatomic_ops-1.2: Resubmitting my patches

Ivan Maidanski ivmai at
Thu May 28 04:48:53 PDT 2009


"Boehm, Hans" <hans.boehm at> wrote:
> Ivan -
> Since some of these partially replaced old patches, could you resubmit the missing parts?
> Thanks.
> Hans

Here is the cumulative patch (resembling diff29, diff68, diff78, diff80 partly) for amd64 and for msvc x86.

libatomic_ops-1.2/ChangeLog entries:
        * src/atomic_ops/sysdeps/gcc/x86_64.h (AO_nop_full): Replace
        K&R-style function definition with ANSI C one.
        * src/atomic_ops/sysdeps/msftc/x86.h (AO_nop_full): Ditto.
        * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_nop_full): Ditto.
        * src/atomic_ops/sysdeps/gcc/x86_64.h: Remove comments about i486.
        * src/atomic_ops/sysdeps/msftc/x86_64.h: Ditto.
        * src/atomic_ops/sysdeps/gcc/x86_64.h
        (AO_compare_double_and_swap_double_full): Fix comment.
        * src/atomic_ops/sysdeps/gcc/x86_64.h
        (AO_compare_double_and_swap_double_full): Swap all "val1" and "val2"
        variables ("val1" is the lowest part of AO_double_t).
        * src/atomic_ops/sysdeps/msftc/x86.h
        (AO_compare_double_and_swap_double_full): Ditto.
        * src/atomic_ops/sysdeps/msftc/x86_64.h
        (AO_compare_double_and_swap_double_full): Ditto.
        * src/atomic_ops/sysdeps/msftc/x86.h: Prefix ASSUME_VISTA macro with
        * src/atomic_ops/sysdeps/msftc/x86.h: Fix comments (prefix
        ASSUME_WINDOWS98 with "AO_").
        * src/atomic_ops/sysdeps/msftc/x86_64.h: Remove comment about
        * src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full):
        Replace AO_TS_SET with its value 0xff (some compilers does not like
        C enum consts inside inline assembler).
        * src/atomic_ops/sysdeps/msftc/x86.h (AO_test_and_set_full): Add
        comment about "missing return value" warning.
        * src/atomic_ops/sysdeps/msftc/x86.h
        * src/atomic_ops/sysdeps/msftc/x86.h (AO_compare_and_swap_full): Use
        _InterlockedCompareExchange() with args and result of PVOID type
        * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_ASM_X64_AVAILABLE): New
        * src/atomic_ops/sysdeps/msftc/x86_64.h: Include
        "test_and_set_t_is_char.h" if AO_ASM_X64_AVAILABLE (same as in
        x86_64.h for gcc).
        * src/atomic_ops/sysdeps/msftc/x86_64.h: Include
        "standard_ao_double_t.h" (same as in x86_64.h for gcc).
        * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_test_and_set_full):
        Implement for AO_ASM_X64_AVAILABLE case.
        * src/atomic_ops/sysdeps/msftc/x86_64.h: Remove AO_CASDOUBLE_MISSING
        macro (replaced with AO_ASM_X64_AVAILABLE).
        * src/atomic_ops/sysdeps/msftc/x86_64.h
        (AO_compare_double_and_swap_double_full): Add intrinsic-based
        implementation for VC++ v9+.
        * src/atomic_ops/sysdeps/standard_ao_double_t.h: Include
        <xmmintrin.h> (and use "__m128" type) if _WIN64.
        * src/atomic_ops/sysdeps/standard_ao_double_t.h
        (AO_HAVE_DOUBLE_PTR_STORAGE): Define it always (as
        "double_ptr_storage" is defined for all cases).
        * src/atomic_ops.h (AO_INLINE): Support inlining for DigitalMars and
        * src/atomic_ops.h (AO_compiler_barrier): Use intrinsic-based
        implementation for VC++ v8+ (include <intrin.h> before it).
        * src/atomic_ops.h: Include VC-specific for Borland, DigitalMars and
        Watcom (Win32 target only).

PS. Having applied this patch, it should be fairly easy to apply sunc-specific patch diff78 [May 11] adding non-pthread-based support for x86/amd64.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: =?koi8-r?Q?diff88=5Fcvs?=
Type: application/octet-stream
Size: 11973 bytes
Desc: not available
Url :

More information about the Gc mailing list