Here is link to the description of TSX: http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/
K On Thu, Feb 16, 2012 at 8:06 PM, Kirill Yukhin <kirill.yuk...@gmail.com> wrote: > Hello guys, > Here is a patch which adds support of first part of Intel TSX extensions. > > Could you please have a look? > > ChangeLog entry: > 2012-02-16 Kirill Yukhin <kirill.yuk...@intel.com> > > * common/config/i386/i386-common.c (OPTION_MASK_ISA_RTM_SET): > New. > (OPTION_MASK_ISA_RTM_UNSET): Ditto. > (ix86_handle_option): Handle OPT_mrtm. > * config.gcc (i[34567]86-*-*): Add rtmintrin.h and > xtestintrin.h. > (x86_64-*-*): Ditto. > * i386-builtin-types.def (CHAR_FTYPE_VOID, 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, > IX86_BUILTIN_XTEST. > (bdesc_special_args): Ditto. > (ix86_init_mmx_sse_builtins): Add IX86_BUILTIN_XABORT. > (ix86_expand_special_args_builtin): Handle new built-in types. > (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 > xtestintrin.h. > * config/i386/rtmintrin.h: New header. > * config/i386/xtestintrin.h: Ditto. > > testsuite/ChangeLog entry: > 2012-02-16 Kirill Yukhin <kirill.yuk...@intel.com> > > * gcc.target/i386/rtm-xabort-1.c: New. > * gcc.target/i386/rtm-xbegin-1.c: Ditto. > * gcc.target/i386/rtm-xend-1.c: Ditto. > * gcc.target/i386/rtm-xtest-1.c: Ditto. > > > Testing passed, bootstrap passed on trunk. > > BTW, I have no idea, where we can commit that? Seems, 4.7.0 is closed > for such features... > > Thanks, K