Hi Richard,

On 2021/11/20 下午6:33, Richard Henderson wrote:
On 11/19/21 7:13 AM, Song Gao wrote:

+
+struct target_sigcontext {
+    uint64_t   sc_pc;
+    uint64_t   sc_gpr[32];
+    uint64_t   sc_fpr[32];
+    uint64_t   sc_fcc;
+    uint32_t   sc_fcsr;
+    uint32_t   sc_flags;
+};

Does not match
https://github.com/loongson/linux/blob/loongarch-next/arch/loongarch/include/uapi/asm/sigcontext.h

#define FPU_REG_WIDTH   256
union fpureg {
    uint32_t   val32[FPU_REG_WIDTH / 32];
    uint64_t   val64[FPU_REG_WIDTH / 64];
};

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   scr[4];
    union fpureg    sc_fpregs[32] __attribute__((aligned(32)));

    uint32_t   sc_reserved;
};

Is this OK?

+
+struct target_ucontext {
+    target_ulong tuc_flags;
+    target_ulong tuc_link;
+    target_stack_t tuc_stack;
+    target_ulong pad0;
+    struct target_sigcontext tuc_mcontext;
+    target_sigset_t tuc_sigmask;
+};

Does not match
https://github.com/loongson/linux/blob/loongarch-next/arch/loongarch/include/uapi/asm/ucontext.h

struct target_ucontext {
    target_ulong tuc_flags;
    target_ulong tuc_link;
    target_stack_t tuc_stack;
    target_sigset_t tuc_sigmask;
    target_ulong pad0;
    struct target_sigcontext tuc_mcontext;
};

Is this OK?

Thanks
Song Gao

Reply via email to