On 1/6/22 1:41 AM, Song Gao wrote:
+struct target_sigcontext {
+ uint64_t sc_pc;
+ uint64_t sc_regs[32];
+ uint32_t sc_flags;
+ uint32_t sc_fcsr;
+ uint32_t sc_vcsr;
+ uint64_t sc_fcc;
+ uint64_t sc_scr[4];
+ union fpureg sc_fpregs[32] __attribute__((aligned(32)));
+ uint8_t sc_reserved[4096] __attribute__((aligned(16)));
+};
Does not match the current (December 31) kernel source.
+static inline void setup_sigcontext(CPULoongArchState *env,
+ struct target_sigcontext *sc)
Don't bother with inline markers anywhere in this file. Let the compiler
decide.
+restore_sigcontext(CPULoongArchState *env, struct target_sigcontext *sc)
+{
+ int i;
+
+ __get_user(env->pc, &sc->sc_pc);
+ __get_user(env->fcsr0, &sc->sc_fcsr);
You need to call restore_fp_status after this assignment, somewhere before the end of the
function.
Otherwise this looks ok.
r~