On 07/05/2010 12:04, Amker.Cheng wrote: >> It is possible. Your expander can handle it before reload; to handle it >> during and after reload, you need to implement a TARGET_SECONDARY_RELOAD >> hook. >> >> http://gcc.gnu.org/onlinedocs/gccint/Register-Classes.html#index-TARGET_005fSECONDARY_005fRELOAD-3974 >> > Thanks Dave, It works, but I found that reload is not the only pass > which might generate fpload/fpstore instructions. > I am working with GCC 4.4(mips), there is function(mips_emit_move), > which is called in many pass after register allocation > and might generate fpload/fpstore. > For example, in pass pro_and_epilogue, it generates load/store for fpu > register which saved by function prologue/epilogue. > > Seems I have to track down all calling of this function and make sure > it works in my way.
Ah, I forgot pro/epilogue generation, but I think that's the only other thing that happens after reload. That is a special case: it has to generate strict rtl that directly matches the insns it wants. You'll probably have to arrange for it to save at least one GPR early enough in the prologue sequence to be able to use it as a temp for your FP moves, and similar in the epilogue sequence. cheers, DaveK