------- Comment #3 from hp at gcc dot gnu dot org  2009-08-17 16:32 -------
(In reply to comment #2)
> 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.

There's nothing wrong with that in a port, besides trigging reload bugs, that
is.  ...and now that you mention it, I guess it might inconvenience the
register allocator.

> 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.

Not all ports, e.g. the m68k port does the same (A6).  IMHO, requiring to
*manually* allocate a virtual frame-pointer in a port only to eliminate it to a
hard register is a wart; it's just complicating the port where middle-end gcc
could do the work.

> This probably would solve the problem.

I'd say it would cover it up, not solve it.

But thanks for looking, I'll have another look myself and try and see if I can
fix the actual reload bug.  I'm not ruling out eventually using a virtual frame
pointer, albeit pragmatically a fix, it just doesn't strike me as TRT.


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hp at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-17 16:32:08
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41085

Reply via email to