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]

[RFC:doc] Mention that subparts for MODES_TIEABLE_P 1 need to be individually addressable


Noticed on the 4.3 branch while playing with vector extensions:
the lower-subreg pass uses the macro this way to check which
modes are decomposable, for better or worse.

Not sure it's for better, it certainly was a surprise to see the
MSB part (for a little-endian target) of a SImode subreg of a
V8QImode-only register being accessed just because a value could
be stored and loaded in both SImode and V8QImode without
copying.

Putting it here in patch-form for discussion.

	* doc/tm.texi (MODES_TIEABLE_P): Mention that subparts have to be
	individually addressable.

Index: doc/tm.texi
===================================================================
--- doc/tm.texi	(revision 21025)
+++ doc/tm.texi	(working copy)
@@ -2212,7 +2212,10 @@ The default is always nonzero.
 
 @defmac MODES_TIEABLE_P (@var{mode1}, @var{mode2})
 A C expression that is nonzero if a value of mode
-@var{mode1} is accessible in mode @var{mode2} without copying.
+@var{mode1} is accessible in mode @var{mode2} without copying,
+and when the modes are of different size, that all parts of the
+larger mode can be accessed as subparts in the smaller mode
+without copying.
 
 If @code{HARD_REGNO_MODE_OK (@var{r}, @var{mode1})} and
 @code{HARD_REGNO_MODE_OK (@var{r}, @var{mode2})} are always the same for

brgds, H-P


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