movdi/df + reload issues

Aurelien Buhrig aurelien.buhrig.gcc@gmail.com
Mon Feb 13 17:02:00 GMT 2012


Hi,

My previous mails were not very clear, so let's try again...

To sum things up, I'm trying to define movdf/movsi patterns with
post_reload split and I have 7 HI regs in DATA_REGS class. 4 of them
(R0:HI->R3:HI, Big endian) may carry function parameters and return value.

When chaining function calls (lib calls), gcc may keep R0 alive between
such calls, even when TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P returns
true for such modes. For example, when chaining an extendsfdf lib call
with a muldf, R0:DF is alive between the 2 calls. If the second
parameter of the muldf function call need a reload, the reload may fail
because DATA_REGS class has only 3 HI regs left.

My GENERAL_REGS class is partitioned into {DATA_REGS,ADDRESS_REGS}.
ADDRESS_REGS class could be used for such reloads. But it seems the IRA
is stick to its preferred class, DATA_REG, despite the alternative class
is GENERAL_REGS. Is it the normal behavior ?

And is there a way to fix this without changing the ABI?

Thank you by advance,
Aurélien



More information about the Gcc-help mailing list