[Bug target/64579] __TM_end __builtin_tend failed to return transactional state

bergner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 5 14:26:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64579

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
Author: bergner
Date: Tue May  5 14:25:35 2015
New Revision: 222808

URL: https://gcc.gnu.org/viewcvs?rev=222808&root=gcc&view=rev
Log:
gcc/

        Backport from mainline.
        2015-04-27  Peter Bergner  <bergner@vnet.ibm.com>

        PR target/64579
        * config/rs6000/htm.md: Remove all define_expands.
        (UNSPECV_HTM_TABORTDC, UNSPECV_HTM_TABORTDCI, UNSPECV_HTM_TABORTWC,
        UNSPECV_HTM_TABORTWCI): Remove.
        (UNSPECV_HTM_TABORTXC, UNSPECV_HTM_TABORTXCI, UNSPECV_HTM_TTEST): New.
        (tabort_internal, tbegin_internal, tcheck_internal, tend_internal,
        trechkpt_internal, treclaim_internal, tsr_internal): Rename from
this...
        (tabort, tbegin, tcheck, tend, trechkpt, treclaim, tsr): ...to this.
        (tabortdc_internal, tabortdci_internal, tabortwc_internal,
        tabortwci_internal): Remove define_insns.
        (tabort<wd>c, tabort<wd>ci): New define_insns.
        (tabort): Use gpc_reg_operand.
        (tcheck): Remove operand.
        (htm_mfspr_<mode>, htm_mtspr_<mode>): Use GPR mode macro.
        * config/rs6000/htmxlintrin.h (__TM_end): Use _HTM_TRANSACTIONAL as
        expected value.
        * config/rs6000/rs6000-builtin.def (BU_HTM_SPR0): Remove.
        (BU_HTM_SPR1): Rename to BU_HTM_V1.  Remove use of RS6000_BTC_SPR.
        (tabort, tabortdc, tabortdci, tabortwc, tabortwci, tbegin,
        tcheck, tend, tendall, trechkpt, treclaim, tresume, tsuspend,
        tsr, ttest): Pass in the RS6000_BTC_CR attribute.
        (get_tfhar, set_tfhar, get_tfiar, set_tfiar, get_texasr, set_texasr,
        get_texasru, set_texasru): Pass in the RS6000_BTC_SPR attribute.
        (tcheck): Remove builtin argument.
        * config/rs6000/rs6000.c (rs6000_htm_spr_icode): Use TARGET_POWERPC64
        not TARGET_64BIT.
        (htm_expand_builtin): Fix usage of expandedp.  Disallow usage of the
        tabortdc and tabortdci builtins when not in 64-bit mode.
        Modify code to handle the loss of the HTM define_expands.
        Emit code to copy the CR register to TARGET.
        (htm_init_builtins): Modify code to handle the loss of the HTM
        define_expands.
        * config/rs6000/rs6000.h (RS6000_BTC_32BIT): Delete.
        (RS6000_BTC_64BIT): Likewise.
        (RS6000_BTC_CR): New macro.
        * doc/extend.texi: Update documentation for htm builtins.

gcc/testsuite/

        Backport from mainline.
        2015-04-27  Peter Bergner  <bergner@vnet.ibm.com>

        PR target/64579
        * gcc.target/powerpc/htm-1.c: New test.
        * gcc.target/powerpc/htm-builtin-1.c (__builtin_tabortdc): Only test
        on 64-bit compiles.
        (__builtin_tabortdci): Likewise.
        (__builtin_tcheck): Remove operand.
        * lib/target-supports.exp (check_htm_hw_available): New function.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.target/powerpc/htm-1.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/rs6000/htm.md
    branches/gcc-4_9-branch/gcc/config/rs6000/htmxlintrin.h
    branches/gcc-4_9-branch/gcc/config/rs6000/rs6000-builtin.def
    branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-4_9-branch/gcc/config/rs6000/rs6000.h
    branches/gcc-4_9-branch/gcc/doc/extend.texi
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_9-branch/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
    branches/gcc-4_9-branch/gcc/testsuite/lib/target-supports.exp



More information about the Gcc-bugs mailing list