------- Comment #2 from vmakarov at redhat dot com 2009-08-17 15:13 ------- Thanks for reporting this bug.
I've looked at the code and I think the patch in question probably triggered some latent reload bug. All wrong code transformations are done in reload. Although I think assigning r8 to pseudo 47 could result in wrong reload behaviour because r8 is used as a frame pointer even before the RA. It looks very strange to me that r8 used as a frame pointer is *not a fixed* register. If I wrote the port, I'd rather use a virtual register for the frame pointer and eliminate it into hard frame pointer register (r8) or to stack pointer as all other ports do. This probably would solve the problem. So I see the 2 solution right now: 1. make r8 fixed which is not so good because it eliminates it from RA when we use only sp for stack addressing 2. use virtual frame pointer and eliminate it into r8 or sp. The first solution is the simplest one, the second is more right, IMHO. I'll be unavailable till the end of Aug. So our discussion will be delayed. Sorry for that. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41085