On 07/16/2009 01:47 AM, Makoto Fujiwara wrote:
Could anyone suggest me which part of the src is taking care
of above save/restore processing ?
   calls.c
   function.c  ->  expand_function_{start,end}()
   caller-save.c  ->  save_call_clobbered_regs()
   reload1.c
   or others ?
I believe it should be in function.c, but I can not figure out
which lines (function) to take care those things.
(or the explanation in info is obsolete ?)

This saving and restoring is *not* handled in generic parts of the compiler. It is handled by the prologue and epilogue patterns in your cpu.md file -- or, normally, by a functions in your cpu.c file, which is invoked by the md patterns.

Look at gcc/config/moxie/moxie.c, moxie_expand_prologue; that's probably the simplest port within gcc at present.


r~

Reply via email to