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 <pbonz...@redhat.com>
> ---
>  include/exec/memory.h | 19 ++++++++++++++++++-
>  memory.c              | 18 ------------------
>  2 files changed, 18 insertions(+), 19 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to