How hard would it be to add a function attribute to gcc that specified different abis?
The main use would be to specify one which changes most of the registers to callee saved so that calling small library functions wont have the impact of requiring work registers to be unnecessarily saved and restored from an application "leaf" function. It would be an interlock so that any function with it set could only call similarly attributed functions (or ones with further restrictions).