I am looking at following code from arm64 and riscv64.

ARM64: https://github.com/openbsd/src/blob/master/sys/arch/arm64/include/signal.h#L51

--------------------------------------------------
struct sigcontext {
 int __sc_unused;
 int sc_mask; /* signal mask to restore */

 unsigned long sc_sp;
 unsigned long sc_lr;
 unsigned long sc_elr;
 unsigned long sc_spsr;
 unsigned long sc_x[30];

 long sc_cookie;
};
--------------------------------------------------

RISCV64: https://github.com/openbsd/src/blob/master/sys/arch/riscv64/include/signal.h#L48

--------------------------------------------------
struct sigcontext {
 int __sc_unused;
 int sc_mask;

 __register_t sc_ra;
 __register_t sc_sp;
 __register_t sc_gp;
 __register_t sc_tp;
 __register_t sc_t[7];
 __register_t sc_s[12];
 __register_t sc_a[8];
 __register_t sc_sepc;

 /* 64 bit floats as well as integer registers */
 __register_t sc_f[32]; /* floating-point registers */
 __register_t sc_fcsr; /* floating-point control register */

 long sc_cookie;
};

--------------------------------------------------

I would like to know what these registers "mean".

Maybe someone knows and can tell me ?

Thank you.

Reply via email to