qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] memory: inline and optimize devend_memop


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] memory: inline and optimize devend_memop
Date: Thu, 12 Sep 2019 13:52:34 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/12/19 10:18 AM, Paolo Bonzini wrote:
> devend_memop can rely on the fact that the result is always either
> 0 or MO_BSWAP, corresponding respectively to host endianness and
> the opposite.  Native (target) endianness in turn can be either
> the host endianness, in which case MO_BSWAP is only returned for
> host-opposite endianness, or the opposite, in which case 0 is only
> returned for host endianness.
> 
> With this in mind, devend_memop can be compiled as a setcond+shift
> for every target.  Do this and, while at it, move it to
> include/exec/memory.h since !NEED_CPU_H files do not (and should not)
> need it.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  include/exec/memory.h | 19 ++++++++++++++++++-
>  memory.c              | 18 ------------------
>  2 files changed, 18 insertions(+), 19 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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