Hi Olivier, > I'm experimenting with the idea of adjusting the > stack probing code using r9 today, to see if it could > save/restore that reg if it happens to be the static chain > as well. > > If that can be made to work, maybe that would be a better > alternative than just swapping and have the stack probing > code use r10 and r11 instead (1 fewer register with dedicated > use).
Remember these are just temporaries for use in the prolog and epilog - there is no need to save/restore the static base. Setting static chain to x9 and the temporaries to x10/x11 is the simplest solution. We can separately look at why the prolog uses more than a single temporary. Cheers, Wilco