|
For an ABI function, call-preserved registers are usually saved on the stack at function prolog and restored at function epilog. Same for register spilling, but at some code "blocks" level.
Based on the control flow of a function, it is possible to dodge some save-restore operations, but a function can be long and hairy.
Do you have some tricks in your source code to help your future self at tracking any find-grained stack registers save-restore operations? Or do you have some insights on that matter?
(I am currently not doing it in a fine-grained fashion but rather in some coarse-grained one, because I consider this like an "optimization" which will happen only when the code is stable in time, and it can be VERY aggressive)
|