qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH 13/24] bsd-user/arm/target_arch_thread.h: Routines to create


From: Warner Losh
Subject: Re: [PATCH 13/24] bsd-user/arm/target_arch_thread.h: Routines to create and switch to a thread
Date: Thu, 28 Oct 2021 13:45:29 -0600



On Thu, Oct 28, 2021 at 9:57 AM Richard Henderson <richard.henderson@linaro.org> wrote:
On 10/19/21 9:44 AM, Warner Losh wrote:
> +    regs->spsr = ARM_CPU_MODE_USR;
> +    if (entry & 0x1) {
> +        regs->spsr |= CPSR_T;
> +    }

(1) Why are you setting SPSR not CPSR?

I think dyslexia is the best answer... I think I added that based on a recent
FreeBSD kernel change and I'm not sure what happened....
 
(2) Changes to CPSR cannot be made manually; you need cpsr_write.

So would 

+        cpsr_write(env, cpsr_read(env) | CPSR_T, CPSR_T, CPSRWriteByInstr);

cover what's needed here?

Warner 

r~

reply via email to

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