qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH v2 22/30] bsd-user/arm/target_arch_signal.h: arm set_sigtramp


From: Warner Losh
Subject: Re: [PATCH v2 22/30] bsd-user/arm/target_arch_signal.h: arm set_sigtramp_args
Date: Wed, 3 Nov 2021 13:14:11 -0600



On Tue, Nov 2, 2021 at 9:37 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 11/2/21 6:52 PM, Warner Losh wrote:
> +    /*
> +     * Low bit indicates whether or not we're entering thumb mode.
> +     */
> +    cpsr = cpsr_read(env);
> +    if (ka->_sa_handler & 1) {
> +        cpsr |= CPSR_T;
> +    } else {
> +        cpsr &= ~CPSR_T;
> +    }
> +    cpsr_write(env, cpsr, CPSR_T, CPSRWriteByInstr);

Like I said before, you don't need the cpsr_read, because the mask ensures that only
CPSR_T will change:

   cpsr_write(env, (ka->_sa_handler & 1) * CPSR_T, CPSR_T, CPSRWriteByInstr);


Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Thanks. Applied. I'd intended to do this for this round, but it slipped my mind.

Warner

reply via email to

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