qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 08/30] bsd-user/arm/target_arch_cpu.h: Implement trivial E


From: Warner Losh
Subject: Re: [PATCH v2 08/30] bsd-user/arm/target_arch_cpu.h: Implement trivial EXCP exceptions
Date: Wed, 3 Nov 2021 10:27:18 -0600



On Tue, Nov 2, 2021 at 9:17 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 11/2/21 6:52 PM, Warner Losh wrote:
> +        case EXCP_UDEF:
> +            {
> +                /* See arm/arm/undefined.c undefinedinstruction(); */
> +                info.si_addr = env->regs[15];
> +
> +                /*
> +                 * Make sure the PC is correctly aligned. (It should
> +                 * be.)
> +                 */
> +                if ((info.si_addr & 3) != 0) {
> +                    info.si_signo = TARGET_SIGILL;
> +                    info.si_errno = 0;
> +                    info.si_code = TARGET_ILL_ILLADR;
> +                    queue_signal(env, info.si_signo, &info);

You won't need this; unaligned pc will raise a different exception.

Dropped.
 
> +                } else {
> +                    int rc = 0;
> +#ifdef NOT_YET
> +                    uint32_t opcode;
> +
> +                    /*
> +                     * Get the opcode.
> +                     *
> +                     * FIXME - what to do if get_user() fails?
> +                     */
> +                    get_user_u32(opcode, env->regs[15]);
> +
> +                    /* Check the opcode with CP handlers we may have. */
> +                    rc = EmulateAll(opcode, &ts->fpa, env);
> +#endif /* NOT_YET */

Drop this til you need it.  Even then, we prefer to emulate all insns in the front-end.
We can talk about what changes need to happen such that the actual CP registers are simply
available at EL0.  I suspect they've already been done for linux-user anyway...

Dropped, reformatted and added a TODO comment.

Both will be in the next spin.

Thanks!

Warner 

reply via email to

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