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



I did find the problem with the 3.0.2 source. It is still present in the latest 3.1 snapshot (Feb 23.). My earlier message was based on the Feb 4. snapshot.

My reasoning is:

We have a function with high register pressure. Now the function 'find_reg' is
called to get a hard register for a big mode.
It does not find a usable register, so it tries the call-clobbered registers. It
then calls 'find_reg' again with accept_call_clobbered == TRUE.
In this second call the macro HARD_REGNO_CALL_PART_CLOBBERED is ignored, because
all uses are after checking accept_call_clobbered.
Then one of the critical registers is chosen.
The first invocation of find_reg sets caller_save_needed to indicate that we
need some saving.
But the code in save_call_clobbered_regs does not know about
HARD_REGNO_CALL_PART_CLOBBERED. So we might allocate a pseudo to a hard register
of the wrong mode, but do not save it correctly.

There is another problem regarding reload. The reload pass must be told not to assume the register being unchanged across a function call. There probably is still another problem somewhere else.


Erwin Unruh, Fujitsu Siemens Computers, C/C++ compiler group

-----Ursprüngliche Nachricht-----
Von: Alexandre Oliva []
Gesendet: Samstag, 23. Februar 2002 01:16
An: Unruh, Erwin

On Feb 22, 2002, "Unruh, Erwin" <> wrote:

> Having a close look at the current implementation of that macro I did find an
> error.

How current?  A patch to fix a problem with it went in in December,
and another in late Jan/early Feb, after the sh64-elf port went in (as
Michael Hayes points out, it uses this macro too, and the fact that
you didn't find it suggests that you may not be using the current CVS

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

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