Controlling what kind of value ends in a register
Alexandre Courbot
Alexandre.Courbot@lifl.fr
Tue Sep 16 16:14:00 GMT 2003
Hello everybody,
My machine definition requires that one kind of register class (named
POINTER_REGS) is exclusively used to hold addresses. In other words, whenever
an address must be stored into a register, this class must be used. In no way
should an address finish in a register that doesn't belong to this class.
My problem is that I don't know how to direct the register allocator to select
the correct register class. Using reloading doesn't help here, as the value
will eventually be copied into the register chosen by the allocator (of wrong
class) after being copied in a register of the right class. I had a look at
regclass.c and couldn't find anything else but costs to direct the allocator.
Costs are unfortunately only a direction and not a requirement.
Is there a way to direct the register allocator to chose a certain class of
registers (that doesn't belong to GENERAL_REGISTERS) from what's being copied
into that reg? I'd bet there is and it is quite obvious, but so far I missed
it. Any pointer would be greatly appreciated.
Thanks,
Alex.
More information about the Gcc
mailing list