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]

Register allocation failure


Hi all,

I am writing a port of gcc for a 16-bit DSP. Up until now, the port has been based upon gcc 3.1, but I recently updated it to use the mainline source code of gcc. In this guise, I am encountering the following problem.

For a particular test case (991118-1.c actually), I get an assertion failure at the very start of insert-save. This is caused by the saving of register 1, which is a caller save register. From what I can find out, this register is being saved as the result of allocating a pseudo-register to register 1. If I look at the results of local register allocation (.lreg) this particular pseudo-register crosses several function calls, so surely it should conflict with the caller save register, and not be used? Furthermore, if I look in the global register dump (.dreg) it states that the pseudo-register conflicts with various hard registers, but not r1.

As far as I can see, there are two scenarios: 1) because the pseudo-register crosses function calls, it should conflict with all caller save registers, or 2) if the allocator has run out of registers, and thus uses a caller-save register, then the abort in saving the register in caller-save is incorrect? Or am I missing something?

Thanks,

Dan.

=============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH, BA1 5BG
dant at picochip dot com
07786 702589




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