[PATCH v6 22/33] riscv: signal: abstract header saving for setup_sigcontext