ChangeLog entry:
commit7f738025325c45e4ffb92f2840ed635d97a71e37
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 May 2012 15:32:01 +0000 (2 15:32 +0000)
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 May 2012 15:32:01 +0000 (2 15:32 +0000)
tree646070e1ed039d18a1ce731130e83a8dc29bb3f1
parentb59e1c9023def96fa20cda22d3366650d22b3763
ChangeLog entry:

        * coretypes (MEMMODEL_MASK): New.
        * builtins.c (get_memmodel): Add val. Call target.memmodel_check
        and return new variable.
        (expand_builtin_atomic_exchange):  Mask memmodel values.
        (expand_builtin_atomic_compare_exchange): Ditto.
        (expand_builtin_atomic_load): Ditto.
        (expand_builtin_atomic_store): Ditto.
        (expand_builtin_atomic_clear): Ditto.
        * doc/extend.texi: Mention port-dependent memory model flags.
        * 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_valid_target_attribute_inner_p)<OPT_mhle>: Ditto.
        * config/i386/i386.c (ix86_target_string)<OPTION_MASK_ISA_HLE>:
        New.
        (ix86_valid_target_attribute_inner_p)<OPT_mhle>: Ditto.
        (ix86_option_override_internal)<PTA_HLE>: New switch, set it
        enabled for generic, generic64 and core-avx2.
        (ix86_print_operand): Generate HLE lock prefixes.
        (ix86_memmodel_check): New.
        (TARGET_MEMMODEL_CHECK): 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/sync.md(atomic_compare_and_swap<mode>): Pass
        success model to instruction emitter.
        (atomic_fetch_add<mode>): Ditto.
        (atomic_exchange<mode>): Ditto.
        (atomic_add<mode>): Ditto.
        (atomic_sub<mode>): Ditto.
        (atomic_<code><mode>): Ditto.
        (*atomic_compare_and_swap_doubledi_pic): Ditto.
        (atomic_compare_and_swap_single<mode>): Define and use argument
        for success model.
        (atomic_compare_and_swap_double<mode>): Ditto.
        * configure.ac: Check if assembler support HLE prefixes.
        * configure: Regenerate.
        * config.in: Ditto.

testsuite/ChangeLog entry:

        * gcc.target/i386/hle-cmpxchg-acq-1.c: New.
        * gcc.target/i386/hle-cmpxchg-rel-1.c: Ditto.
        * gcc.target/i386/hle-add-acq-1.c: Ditto.
        * gcc.target/i386/hle-add-rel-1.c: Ditto.
        * gcc.target/i386/hle-and-acq-1.c: Ditto.
        * gcc.target/i386/hle-and-rel-1.c: Ditto.
        * gcc.target/i386/hle-or-acq-1.c: Ditto.
        * gcc.target/i386/hle-or-rel-1.c: Ditto.
        * gcc.target/i386/hle-sub-acq-1.c: Ditto.
        * gcc.target/i386/hle-sub-rel-1.c: Ditto.
        * gcc.target/i386/hle-xadd-acq-1.c: Ditto.
        * gcc.target/i386/hle-xadd-rel-1.c: Ditto.
        * gcc.target/i386/hle-xchg-acq-1.c: Ditto.
        * gcc.target/i386/hle-xchg-rel-1.c: Ditto.
        * gcc.target/i386/hle-xor-acq-1.c: Ditto.
        * gcc.target/i386/hle-xor-rel-1.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187051 138bc75d-0d04-0410-961f-82ee72b054a4
35 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/config.in
gcc/config/i386/cpuid.h
gcc/config/i386/driver-i386.c
gcc/config/i386/i386-c.c
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md
gcc/config/i386/i386.opt
gcc/config/i386/sync.md
gcc/configure
gcc/configure.ac
gcc/coretypes.h
gcc/doc/extend.texi
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/hle-add-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-add-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-and-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-and-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-or-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-or-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xchg-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c [new file with mode: 0644]