On 24/06/2015 12:21, Peter Maydell wrote:
> > I think signal_cpsr_e is exactly what you want for AArch32.  It sets
> > CPSR.E in main and setup_return for AArch32.
> >
> > For AArch64 you don't need anything because, even though the kernel does
> > trap setend and tweak SCTLR.E0E in response to it, setup_return doesn't
> > try to restore the native endianness.
>
> I didn't think SETEND existed at all in AArch64?

No, but the kernel traps it and flips SCTLR.E0E.  We don't have to
emulate that, and anyway you're right that userspace code will always be
the same endianness as the signal handler: the kernel expects it that way.

Paolo

> It's a 32-bit only
> instruction. So the AArch64 setup is anyway much simpler because
> you don't have to worry about the userspace code being a different
> endianness to what you want to run the signal handler as.

Reply via email to