在 2022/6/24 07:34, Richard Henderson 写道: > On 6/23/22 01:55, Song Gao wrote: >> +static void setup_sigcontext(CPULoongArchState *env, >> + struct target_sigcontext *sc, >> + struct extctx_layout *extctx) >> +{ >> + int i; >> + >> + if (extctx->flags & SC_USED_FP) { >> + __put_user(extctx->fpu.addr, &sc->sc_extcontext[0]); >> + } else { >> + __put_user(extctx->end.addr, &sc->sc_extcontext[0]); >> + } > > This is incorrect. Where did this come from? It certainly doesn't appear in > the kernel's version of setup_sigcontext. The only reason the result works > for you is that this is overwritten by copy_fpu_to_sigframe within > setup_sigframe. The val of flags is SC_USED_FP alway in function setup_extcontext in this version. We want to optimization in future if FP is not used for application where sigcontext for FP is not necessary. Also it can will be extended for 128bit/256bit vector FPU. regards bibo,mao > > > r~
- [PATCH v19 00/13] Add LoongArch linux-user emulation sup... Song Gao
- [PATCH v19 07/13] target/loongarch: remove badaddr ... Song Gao
- [PATCH v19 03/13] linux-user: Add LoongArch elf sup... Song Gao
- [PATCH v19 09/13] target/loongarch: Fix helper_asrt... Song Gao
- [PATCH v19 02/13] linux-user: Add LoongArch signal ... Song Gao
- Re: [PATCH v19 02/13] linux-user: Add LoongArch... Richard Henderson
- Re: [PATCH v19 02/13] linux-user: Add Loong... maobibo
- Re: [PATCH v19 02/13] linux-user: Add L... maobibo
- Re: [PATCH v19 02/13] linux-user: Add L... Richard Henderson
- [PATCH v19 13/13] target/loongarch: Update README Song Gao
- [PATCH v19 01/13] linux-user: Add LoongArch generic... Song Gao
- [PATCH v19 08/13] target/loongarch: Fix missing upd... Song Gao
- [PATCH v19 06/13] scripts: add loongarch64 binfmt c... Song Gao
- [PATCH v19 11/13] target/loongarch: Adjust function... Song Gao
- [PATCH v19 05/13] linux-user: Add LoongArch cpu_loo... Song Gao
- [PATCH v19 04/13] linux-user: Add LoongArch syscall... Song Gao