qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v14 19/26] linux-user: Add LoongArch signal support


From: Richard Henderson
Subject: Re: [PATCH v14 19/26] linux-user: Add LoongArch signal support
Date: Thu, 6 Jan 2022 20:58:19 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]