This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
MODES_TIEABLE_P for big endian
- To: gcc at gcc dot gnu dot org
- Subject: MODES_TIEABLE_P for big endian
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Wed, 8 Nov 2000 00:49:46 +0000 (GMT)
tm.h says:
@findex MODES_TIEABLE_P
@item 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.
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
any @var{r}, then @code{MODES_TIEABLE_P (@var{mode1}, @var{mode2})}
should be nonzero. If they differ for any @var{r}, you should define
this macro to return zero unless some other mechanism ensures the
accessibility of the value in a narrower mode.
Does that mean that MODES_TIABLE_P has to return zero for big endian for
any mode that occupies more than one hard register?
local-alloc certainly behaves like this is a requirement.
When it ties a multi-hard reg partial integer mode with a single-hard
reg integer mode, it allocates a register for the partial integer mode,
and wants to use the same register number for the single-hard reg
integer mode.
So, is this a design limitation, or is it a bug, that I may fix by
doing a big endian correction when assigning a hard register to
a pseudo that has a smaller mode than its quantity?