Here is patch with removed implied atomic ACQUIRE/RELEASE. Could you
please have a look?

ChangeLog entry:
2012-04-12  Kirill Yukhin  <>

        * builtins.c (get_memmodel): Remove check of upper bound.
        (expand_builtin_atomic_compare_exchange): Mask memmodel values.
        * config/i386/cpuid.h (bit_HLE): New.
        * config/i386/driver-i386.c (host_detect_local_cpu): Detect
        HLE support.
        * config/i386/i386-protos.h (ix86_generate_hle_prefix): New.
        * config/i386/i386-c.c (ix86_target_macros_internal): Set
        HLE defines.
        (ix86_target_string)<-mhle>: New.
        (ix86_option_override_internal)<PTA_HLE>: Ditto.
        (ix86_valid_target_attribute_inner_p)<OPT_mhle>: Ditto.
        * config/i386/i386.c (ix86_target_string)<OPTION_MASK_ISA_HLE>:
        (ix86_valid_target_attribute_inner_p)<OPT_mhle>: Ditto.
        (ix86_generate_hle_prefix): Ditto.
        * config/i386/i386.h (OPTION_ISA_HLE): Ditto.
        (IX86_HLE_ACQUIRE): Ditto.
        (IX86_HLE_RELEASE): Ditto.
        * config/i386/i386.h (ix86_generate_hle_prefix): Ditto.
        * config/i386/i386.opt (mhle): Ditto.
        * config/i386/<mode>): Pass
        success model to instruction emitter.
        (atomic_compare_and_swap_single<mode>): Define and use argument
        for success model.
        (atomic_compare_and_swap_double<mode>): Ditto.
        * Check if assembler support HLE prefixies.
        * configure: Regenerate.
        * Ditto.

Thanks, K

Attachment: hle-rfc-5.gcc.patch
Description: Binary data

Reply via email to