Message ID | 20210822035537.283193-17-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | linux-user: Clean up siginfo_t handling | expand |
On Sun, 22 Aug 2021 at 04:55, Richard Henderson <richard.henderson@linaro.org> wrote: > > This si_code was changed in 75abf64287cab, for linux 4.17. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/syscall_defs.h | 1 + > linux-user/hppa/cpu_loop.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index 55ccc6ae03..f9efbffe0c 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -688,6 +688,7 @@ typedef struct target_siginfo { > #define TARGET_FPE_FLTINV (7) /* floating point invalid operation */ > #define TARGET_FPE_FLTSUB (8) /* subscript out of range */ > #define TARGET_FPE_FLTUNK (14) /* undiagnosed fp exception */ > +#define TARGET_FPE_CONDTRAP (15) /* trap on condition */ > #define TARGET_NSIGFPE 15 We don't use TARGET_NSIGFPE, but we should either update it as the kernel did in 75abf64287cab, or just delete it. (We don't have the equivalent NSIGTRAP, NSIGBUS, etc for the other si_codes, so maybe deleting is the simplest option. If you want to put a preceding patch that just deletes our TARGET_NSIGFPE definition, you can have my r-by for that.) Otherwise Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 55ccc6ae03..f9efbffe0c 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -688,6 +688,7 @@ typedef struct target_siginfo { #define TARGET_FPE_FLTINV (7) /* floating point invalid operation */ #define TARGET_FPE_FLTSUB (8) /* subscript out of range */ #define TARGET_FPE_FLTUNK (14) /* undiagnosed fp exception */ +#define TARGET_FPE_CONDTRAP (15) /* trap on condition */ #define TARGET_NSIGFPE 15 /* diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index 7bc85dffd0..cc076e7cdb 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -171,6 +171,8 @@ void cpu_loop(CPUHPPAState *env) force_sig_fault(TARGET_SIGFPE, TARGET_FPE_INTOVF, env->iaoq_f); break; case EXCP_COND: + force_sig_fault(TARGET_SIGFPE, TARGET_FPE_CONDTRAP, env->iaoq_f); + break; case EXCP_ASSIST: force_sig_fault(TARGET_SIGFPE, 0, env->iaoq_f); break;
This si_code was changed in 75abf64287cab, for linux 4.17. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall_defs.h | 1 + linux-user/hppa/cpu_loop.c | 2 ++ 2 files changed, 3 insertions(+) -- 2.25.1