On 4/3/19 7:29 PM, William Tambe wrote: > Does the prologue and epilogue need to save and restore STATIC_CHAIN_REGNUM ? > or does GCC automatically takes care of it ? > If a callee-saved register is used, then the prologue will need to save/restore it. That should apply to STATIC_CHAIN_REGNUM, PIC_REGNUM and others. However, typically STATIC_CHAIN_REGNUM is caller-saved -- after all it's effectively a hidden parameter. Jeff