qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/7] target-arm: Don't generate code specific to


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/7] target-arm: Don't generate code specific to current CPU mode for SRS
Date: Fri, 7 Jan 2011 16:25:43 +0000

On 7 January 2011 16:01, Aurelien Jarno <address@hidden> wrote:
> On Fri, Jan 07, 2011 at 03:06:28PM +0000, Peter Maydell wrote:
>> When translating the SRS instruction, handle the "store registers
>> to stack of current mode" case in the helper function rather than
>> inline. This means the generated code does not make assumptions
>> about the current CPU mode which might not be valid when the TB
>> is executed later.
>
> Have you considered using tb flags instead? On the other hand I am not
> sure it will make a real difference.

I thought about that, but:
(a) if we put the current mode into the tb->flags then TBs which
could previously have been shared between several modes now
have to be translated as separate TBs for each mode
(b) it would eat 5 bits of tb->flags and we only have 16 left
(c) SRS isn't a very commonly used instruction anyway (and
the overhead of taking the exception will dwarf the call out
to the helper for SRS)

-- PMM



reply via email to

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