On Tue, Nov 2, 2021 at 9:17 PM Richard Henderson < richard.hender...@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