AM30/AM33 SP handling
Alexandre Oliva
aoliva@cygnus.com
Fri Apr 21 13:59:00 GMT 2000
On Apr 21, 2000, Jeffrey A Law <law@cygnus.com> wrote:
> In message < orpurj9run.fsf@zecarneiro.lsd.ic.unicamp.br >you write:
>> * config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return
>> EXTENDED_REGS only if TARGET_AM33.
>>
>> * config/mn10300/mn10300.md (movsi): Move SP handling to
>> separate patterns.
> I fail to see the benefit of the movsi change.
Unfortunately, it's necessary to avoid a reload failure. When GCC
gets to `xy' but no `x' registers are available, it tries to spill
`sp' and fails:
[(set (match_operand:SI 0 "general_operand"
"=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,y")
(match_operand:SI 1 "general_operand"
"0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,xy,axR"))]
^^
It might work to simply remove the `x' from this entry (it's clearly
redundant), but breaking the SP handling allows us to use data
registers to copy from/to SP on AM33.
> It may also be dangerous -- at one time the movXX patterns were
> special in that they needed to support all the possible movXX
> alternatives in a single pattern. I do not know if the movXX
> patterns are still special in that respect.
They don't seem to be. I've had no regressions in the testsuite with
this patch.
> If the REG_CLASS_FROM_LETTER change is OK if it does not depend on the
> movsi change.
So it's on hold for now.
> I'd prefer to leave movsi alone unless there is significant benefit in
> changing it -- measurable improvement across any of the 3 optimization
> axis (compile time speed, generated code size, generated code speed) or
> for maintenance purposes.
Well, it decreases register pressure, but that's not that much of an
issue on AM33.
--
Alexandre Oliva Enjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
More information about the Gcc-patches
mailing list