From: Gabriel Paubert <paubert@iram.es>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: olof@lixom.net, linuxppc-dev@ozlabs.org,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] atomic_dec_if_positive sign extension fix
Date: Tue, 16 Jan 2007 05:28:29 +0100 [thread overview]
Message-ID: <20070116042829.GA24654@iram.es> (raw)
In-Reply-To: <4391e3fc8335446ddeedecb5670d4a00@kernel.crashing.org>
On Mon, Jan 15, 2007 at 05:01:12PM +0100, Segher Boessenkool wrote:
> >It also avoids clobbering the carry, you don't know whether a future
> >version of GCC will require explicit clobbers for the carry. For now
> >they are useless: you can specify "xer" in the clobber list AFAIR but
> >no pattern can be split between setters and users of the carry in the
> >machine description.
>
> You can specify "cc" in the clobber list already, don't use
> "xer" unless you're clobbering something else in the XER.
>
Hmm, I believed "cc" was an alias for cr0.
[Looking at gcc sources]
Ths snippet of gcc/config/rs6000.h confirms this:
{"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \
{"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \
{"cc", 68}, {"sp", 1}, {"toc", 2} }
In this file, xer has number 76. So "cc" does not indicate a carry
clobber. There is currently no way to specify a carry clobber, but
also gcc will never insert an inline asm between settings and uses
of the carry.
The following comment:
/* PSImode is used for the XER register. The XER register
is not used for anything; perhaps it should be deleted,
except that that would change register numbers. */
PARTIAL_INT_MODE (SI);
in gcc/config/rs6000-modes.def is actually a bit misleading since the
XER is often clobbered by instructions. But the XER is actually never
exposed to the instruction scheduler: all the patterns that set and use
the carry are simple lists of machine instructions which will be put in
the final object without modifications (only register number and possibly
immediate value substitution).
Gabriel
next prev parent reply other threads:[~2007-01-16 4:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-14 22:55 [PATCH] atomic_dec_if_positive sign extension fix Robert Jennings
2007-01-14 23:09 ` Paul Mackerras
2007-01-14 23:20 ` Olof Johansson
2007-01-14 23:32 ` Segher Boessenkool
2007-01-14 23:43 ` Segher Boessenkool
2007-01-15 8:55 ` Gabriel Paubert
2007-01-15 16:01 ` Segher Boessenkool
2007-01-16 4:28 ` Gabriel Paubert [this message]
2007-01-16 8:36 ` Segher Boessenkool
2007-01-16 18:16 ` [PATCH][v2] " Robert Jennings
2007-01-16 20:08 ` Gabriel Paubert
2007-01-17 16:50 ` [PATCH][v3] " Robert Jennings
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=20070116042829.GA24654@iram.es \
--to=paubert@iram.es \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.