This patch adds the support required for using the __riscv_save and __riscv_restore libcalls to implement a size-optimization for prologue and epilogue code, whereby the spill and restore code of callee-saved registers is implemented by common functions to reduce code duplication.
The initial prototype for this patch was implemented by @simoncook
Given the clang option defaults to false, I think it should here too, to avoid confusion in other frontends.