[PATCH v12 16/28] riscv: signal: abstract header saving for setup_sigcontext