From: Segher Boessenkool <segher@kernel.crashing.org>
To: Peter Bergner <bergner@vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>,
Michael Meissner <meissner@linux.vnet.ibm.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH, rs6000, testsuite] Fix PR target/64579, __TM_end __builtin_tend failed to return transactional state
Date: Thu, 23 Apr 2015 01:55:00 -0000 [thread overview]
Message-ID: <20150423015534.GB29172@gate.crashing.org> (raw)
In-Reply-To: <1429744106.21947.56.camel@otta>
On Wed, Apr 22, 2015 at 06:08:26PM -0500, Peter Bergner wrote:
> > > > > + case HTM_BUILTIN_TTEST: /* Alias for: tabortwci. 0,r0,0 */
> > > > > + op[nopnds++] = GEN_INT (0);
> > > > > + op[nopnds++] = gen_rtx_REG (SImode, 0);
> > > > > + op[nopnds++] = GEN_INT (0);
> > > >
> > > > Is that really r0, isn't that (0|rA)? [Too lazy to read the docs myself
> > > > right now, sorry.]
> > >
> > > The ISA doc shows:
> >
> > [snip]
> >
> > Thanks for looking it up!
> >
> > I'm still a bit worried about putting a reg in the RTL (while the instruction
> > doesn't actually use one), but perhaps it's harmless.
>
> I'm not sure what you mean by the "instruction doesn't use one".
> The hardware instruction does use a register for its second
> operand (even though its contents are ignored due to TO == 0)
> and the pattern requires us to pass in a reg rtx, so I'm not
> sure what you're referring to.
I mean the instruction doesn't actually use the value in the register
(if it did, you couldn't just pass in a non-fixed hard register in RTL).
Using a hard reg in the RTL like this has a few problems:
a) It might hinder register allocation. Maybe it doesn't, not sure;
b) It does hinder scheduling;
c) It can make things ICE, maybe with register asm.
I no longer think c) will happen in this case.
The alternative is to write a separate define_insn for ttest, one
without inputs; the generated assembler can still be the same of
course.
Cheers,
Segher
next prev parent reply other threads:[~2015-04-23 1:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 19:27 Peter Bergner
2015-03-20 20:52 ` Segher Boessenkool
2015-03-20 22:42 ` Peter Bergner
2015-04-21 20:56 ` Peter Bergner
2015-04-22 2:18 ` Segher Boessenkool
2015-04-22 13:43 ` Peter Bergner
2015-04-22 22:16 ` Segher Boessenkool
2015-04-22 23:08 ` Peter Bergner
2015-04-23 1:55 ` Segher Boessenkool [this message]
2015-04-23 3:17 ` Peter Bergner
2015-04-23 19:16 ` Peter Bergner
2015-04-24 15:34 ` Segher Boessenkool
2015-04-24 15:40 ` David Edelsohn
2015-04-27 15:21 ` Peter Bergner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150423015534.GB29172@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=bergner@vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=meissner@linux.vnet.ibm.com \
--cc=wschmidt@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).