This is the mail archive of the gcc@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]

Re: question regarding regrename and failure of 950704-1.c on main


In message <20020510111917.H16288@redhat.com>, Richard Henderson writes:
 > On Fri, May 10, 2002 at 11:37:53AM -0400, John David Anglin wrote:
 > > The problem comes in the register rename pass.  The selection of di 22
 > > in the reload pass is ok since di 23 is dead.  Di 23 is copied initially
 > > to di 2.  However, the rename pass eliminates the copy and substitutes
 > > di 23 into the insn setting di 22.
 > 
 > So the problem as I understand it is that an argument register was
 > in a pair that was not HARD_REGNO_MODE_OK.  That definitely seems
 > questionable at best.
Normally a DImode value on the PA has the most significant word in an even
register (N) and the least significant word in an odd register(N+1).  This
is how all the arithmetic works and this is also how DImode values are 
returned.

Unfortunately when passing a DImode value as a parameter we are forced to
put the MSW in an odd register (N) and the LSW in an even register (N+1).
(note we haven't changed endianness, we're still big endian, but we start
from an odd reg rather than an even reg).

So there's basically no way to "win" -- no matter what we're going to have
DImode values in hard regs which are not allowed by HARD_REGNO_MODE_OK  due
to the way passing and returning values works -- unless we made any reg 
suitable
for HARD_REGNO_MODE_OK and put earlyclobbers on every DImode patter (which 
seems
excessively bad performance-wise).

One thing we might consider is using the parameter conventions for normal
access (ie, DImode values start in an odd register).  That might help
performance of long long code by requiring less argument shuffling at
function entry.

jeff


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