> The patch is OK for mainline, if there are no further comments in next 24h.

Thank you!

According to Tobias's input, I've added few lines about RTM to
doc/invoke.texi. If no objections - I'll commit the patch tomorrow.

Updated patch attached.
Updated ChangeLog entry:
2012-03-11  Kirill Yukhin  <kirill.yuk...@intel.com>

        * doc/invoke.texi: Document -mrtm option.
        * common/config/i386/i386-common.c (OPTION_MASK_ISA_RTM_SET):
        (ix86_handle_option): Handle OPT_mrtm.
        * config.gcc (i[34567]86-*-*): Add rtmintrin.h and
        (x86_64-*-*): Ditto.
        * i386-builtin-types.def (INT_FTYPE_VOID): New.
        * config/i386/i386-c.c (ix86_target_macros_internal): Define
        __RTM__ if needed.
        (ix86_target_string): Define -mrtm option.
        (PTA_RTM): New.
        (ix86_option_override_internal): Extend "cirei7-avx" with
        RTM option. Handle new option.
        (ix86_valid_target_attribute_inner_p): Add OPT_mrtm.
        (ix86_builtins): Add IX86_BUILTIN_XBEGIN, IX86_BUILTIN_XEND,
        (bdesc_special_args): Ditto.
        (ix86_init_mmx_sse_builtins): Add IX86_BUILTIN_XABORT.
        (ix86_expand_special_args_builtin): Handle new built-in type.
        (ix86_expand_builtin): Handle XABORT instruction.
        * config/i386/i386.h (TARGET_RTM): New.
        * config/i386/i386.md (UNSPECV_XBEGIN): New.
        (UNSPECV_XEND): Ditto.
        (UNSPECV_XABORT): Ditto.
        (UNSPECV_XTEST): Ditto.
        (xbegin): Ditto.
        (xbegin_1): Ditto.
        (xend): Ditto.
        (xabort): Ditto
        (xtest): Ditto.
        (xtest_1): Ditto.
        * config/i386/i386.opt (mrtm): New.
        * config/i386/immintrin.h: Include rtmintrin.h and
        * config/i386/rtmintrin.h: New header.
        * config/i386/xtestintrin.h: Ditto.

Thanks, K

Reply via email to