This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386, middle-end, tessuite] Intel TSX's HLE.

Thanks a lot for prompts!
I've updated my patch, so cmparing to previous it is:
  - have dedicated hook var, to define target dep. bits in mem model.
Check (and warning) is performed in get_memmodel
   - prefix emit performed through dedicated operand type (%K)

Updated ChangeLog entry:
2012-04-19  Kirill Yukhin  <>

        * builtins.c (get_memmodel):Check of upper bound with respect
        to target dependent mask.
        (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_print_operand): Generate HLE lck prefixes.
        * 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_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.
        * Check if assembler support HLE prefixes.
        * configure: Regenerate.
        * Ditto.

testsuite/ChangeLog unchanged.

Patch attached.

Thanks, K

Attachment: hle-3.gcc.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]