This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000, testsuite] Fix PR target/64579, __TM_end __builtin_tend failed to return transactional state
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Fri, 20 Mar 2015 17:41:59 -0500
- Subject: Re: [PATCH, rs6000, testsuite] Fix PR target/64579, __TM_end __builtin_tend failed to return transactional state
- Authentication-results: sourceware.org; auth=none
- References: <1426879660 dot 13627 dot 71 dot camel at otta> <20150320205200 dot GA32613 at gate dot crashing dot org>
On Fri, 2015-03-20 at 15:52 -0500, Segher Boessenkool wrote:
> Maybe it would be nicer if the builtin-expansion code handled the copy
> from cc, instead of stacking on RTL expanders.
That would allow getting rid of the expanders completely, which
would be nice. I'd have to somehow add some type of RS6000_BTC_*
flag onto the builtin though, so I can tell during builtin expansion
whether I need to emit the cr copy code or not. I'll give that a
try ...when I return from sunny Mexico in a week. :-)
Thanks for the suggestion.
> > (define_expand "tabortdc"
[snip]
> > + (match_operand 1 "u5bit_cint_operand" "n")
[snip]
>
> Expanders have no constraints (you can leave out the field completely).
> Doesn't gen* warn on non-empty constraints?
Correct, and David mentioned this when I first submitted the original
HTM patch, but I replied they were added to allow better error
messages when people used out of range integers for builtin args:
https://gcc.gnu.org/ml/gcc-patches/2013-07/msg00565.html
> > --- gcc/testsuite/gcc.target/powerpc/htm-1.c (revision 0)
> > +++ gcc/testsuite/gcc.target/powerpc/htm-1.c (working copy)
> > @@ -0,0 +1,53 @@
> > +/* { dg-do run { target { powerpc*-*-* && htm_hw } } } */
> > +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
>
> htm_hw already disallows Darwin? [ And {"*"} {""} is default. ]
>
> > + # For now, disable on Darwin
> > + if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} {
> > + expr 0
>
> If ever HTM is enabled on Darwin, the testcases should Just Work as far
> as I see.
Heh, just cut/pasted the dg-do-skip from another test case, but yes,
we can remove it. Thanks.
It's too bad we can't have a "dg-do run" and a "dg-do compile", one
used when we're on HTM hardware and the other when we're not, so we
can at least compile the test case.
Peter