This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[trunk] Addition to subreg section of rtl.text.


Does every one agree that what i am adding is correct?

kenny
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]