Kenneth Zadeck <[EMAIL PROTECTED]> writes: > > For complete accuracy, there are probably going to be some target > > specific registers which need to be handled, unfortunately. For > > example, on MIPS, with -mabicalls (which is the default on GNU/Linux), > > $25 is live on function entry. It holds the address of the function, > > and is used to initialize $28, which is PIC_OFFSET_TABLE_REGNUM. I > > don't think there is any target independent way of getting at that > > fact. > > > > > Is the right thing to do to define a target hook for this that > defaults to doing nothing and we only define it in those places where > necessary or should I add a few other macros to the ports as necessary > and just check to see if they are defined? I have noticed that there > are several macros that are only used on a single port.
I think the best approach would be a target hook. I guess you could pass it the function decl and have it set bits in a bitmap or a HARD_REG_SET. You might even want to do the whole thing in a target hook, in which case the code you wrote would become the default version of the hook (and would probably be called by non-default versions). I don't have a strong feeling as to which approach would be best. Ian