From: Joern Rennecke <amylaar@cygnus.co.uk>
To: Jan Hubicka <jh@suse.cz>
Cc: Joern Rennecke <amylaar@pasanda.cygnus.co.uk>, gcc@gcc.gnu.org
Subject: Re: SUBREGs and modes
Date: Wed, 02 Aug 2000 09:13:00 -0000 [thread overview]
Message-ID: <200008021613.RAA25138@phal.cygnus.co.uk> (raw)
In-Reply-To: <20000802174932.A20604@atrey.karlin.mff.cuni.cz>
> > > weird usage of SUBREGs. According to my uderstanding the docs, when
> > > WORDNUM is nonzero, the innermode must be greater than word and
> > > the outer mode must be word.
> >
> > Where does it say that the outer mode must be word?
> The other use of @code{subreg} is to extract the individual registers of
> a multi-register value. Machine modes such as @code{DImode} and
> @code{TImode} can indicate values longer than a word, values which
> usually require two or more consecutive registers. To access one of the
> registers, use a @code{subreg} with mode @code{SImode} and a
> @var{wordnum} that says which register.
>
> Actually speaks about SImode, but is interpreted in the code as
> word.
Well, this is not a definition, but (a part of) an enumeration of uses.
A subreg can fulfill both uses at a time.
Actually, the very next paragraph hints at that:
Storing in a non-paradoxical @code{subreg} has undefined results for
bits belonging to the same word as the @code{subreg}. This laxity makes
it easier to generate efficient code for such instructions. To
represent an instruction that preserves all the bits outside of those in
This implies that there are cases where you have a subreg of a reg with
multiple words, where not all bits of a word are stored to.
Note that nested subregs are not allowed, so we really *have* to express
the access of a single smaller-than-word part of a multi word register
with a single SUBREG.
Do you have a suggestion how to make the documentation more clear on that
count?
next prev parent reply other threads:[~2000-08-02 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-02 5:49 Jan Hubicka
2000-08-02 5:58 ` Jakub Jelinek
2000-08-02 8:39 ` Joern Rennecke
2000-08-02 8:49 ` Jan Hubicka
2000-08-02 9:13 ` Joern Rennecke [this message]
2000-08-02 9:30 ` Jan Hubicka
2000-08-02 12:40 ` Geoff Keating
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=200008021613.RAA25138@phal.cygnus.co.uk \
--to=amylaar@cygnus.co.uk \
--cc=amylaar@pasanda.cygnus.co.uk \
--cc=gcc@gcc.gnu.org \
--cc=jh@suse.cz \
/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).