From: Kenneth Zadeck <zadeck@naturalbridge.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
Ian Lance Taylor <iant@google.com>,
"Bonzini, Paolo" <bonzini@gnu.org>,
Richard Sandiford <rsandifo@nildram.co.uk>
Subject: [trunk] Addition to subreg section of rtl.text.
Date: Fri, 14 Mar 2008 14:24:00 -0000 [thread overview]
Message-ID: <47DA8A3E.7060002@naturalbridge.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 62 bytes --]
Does every one agree that what i am adding is correct?
kenny
[-- Attachment #2: doc1.diff --]
[-- Type: text/x-patch, Size: 1623 bytes --]
Index: rtl.texi
===================================================================
--- rtl.texi (revision 133159)
+++ rtl.texi (working copy)
@@ -1730,15 +1730,21 @@ are in @var{m}.
Sometimes @var{m} is wider than the mode of @var{reg}. These
@code{subreg} expressions are often called @dfn{paradoxical}. They are
used in cases where we want to refer to an object in a wider mode but do
-not care what value the additional bits have. The reload pass ensures
-that paradoxical references are only made to hard registers.
-
+not care what value the additional bits have. The smaller register
+always overlaps the least significant bits of the larger register and
+the @var{bytenum} is always zero for paradoxical registers (even on big
+endian machines). The reload pass ensures that paradoxical references
+are only made to hard registers.
+
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{bytenum} offset that says which register.
+@var{bytenum} offset that says which register. In this case, the
+@var(bytenum) must align the outer value to a word boundary if the inner
+register is a psuedo or to a register boundary if the inner register is
+a hard register.
Storing in a non-paradoxical @code{subreg} has undefined results for
bits belonging to the same word as the @code{subreg}. This laxity makes
next reply other threads:[~2008-03-14 14:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 14:24 Kenneth Zadeck [this message]
2008-03-14 14:45 ` Richard Sandiford
2008-03-14 14:48 ` Ian Lance Taylor
2008-03-14 14:49 ` Kenneth Zadeck
2008-03-14 14:51 ` Ian Lance Taylor
2008-03-14 14:59 ` Kenneth Zadeck
2008-03-14 15:17 ` Richard Sandiford
2008-03-14 17:00 ` Kenneth Zadeck
2008-03-14 17:14 ` Richard Sandiford
2008-03-14 14:51 ` Ian Lance Taylor
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=47DA8A3E.7060002@naturalbridge.com \
--to=zadeck@naturalbridge.com \
--cc=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
--cc=rsandifo@nildram.co.uk \
/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).