qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode
Date: Wed, 24 Jun 2015 12:09:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 23/06/2015 22:30, Peter Crosthwaite wrote:
> > I'm confused. arm_cpu_is_big_endian() tells you whether the CPU
> > is *currently* big-endian or not. That doesn't help you with
> > answering the question "I'm about to run a signal handler; what
> > should I set the CPSR.E bit to?" in linux-user mode. That's
> > what signal_cpsr_e does.
>
> arm_cpu_is_bigendian is the consumer of this information. We still
> need some state for signal_cpsr_e, just the question is what state
> does that set. If we reuse arm_cpu_is_big_endian, then signal_cpsr_e
> (or its rename) needs to drive CPSR.E as well as SCTLR.E0E.

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.

Paolo



reply via email to

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