qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 09/41] linux-user/host/alpha: Populate host_signal.h
Date: Sun, 19 Sep 2021 20:13:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 9/18/21 20:44, Richard Henderson wrote:
> Split host_signal_pc and host_signal_write out of user-exec.c.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/host/alpha/host-signal.h | 41 +++++++++++++++++++++++++++++
>  accel/tcg/user-exec.c               | 31 +---------------------
>  2 files changed, 42 insertions(+), 30 deletions(-)
>  create mode 100644 linux-user/host/alpha/host-signal.h

> +#ifndef ALPHA_HOST_SIGNAL_H
> +#define ALPHA_HOST_SIGNAL_H
> +
> +static inline uintptr_t host_signal_pc(ucontext_t *uc)
> +{
> +    return uc->uc_mcontext.sc_pc;
> +}
> +
> +static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc)
> +{
> +    uint32_t *pc = uc->uc_mcontext.sc_pc;

BTW I'd use host_signal_pc() here for consistency with other targets.

> +    uint32_t insn = *pc;
> +
> +    /* XXX: need kernel patch to get write flag faster */
> +    switch (insn >> 26) {
> +    case 0x0d: /* stw */
> +    case 0x0e: /* stb */
> +    case 0x0f: /* stq_u */
> +    case 0x24: /* stf */
> +    case 0x25: /* stg */
[...]



reply via email to

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