Skip to content
  • Paolo Bonzini's avatar
    7a3df11c
    memory: inline and optimize devend_memop · 7a3df11c
    Paolo Bonzini authored
    
    
    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.
    
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    7a3df11c
    memory: inline and optimize devend_memop
    Paolo Bonzini authored
    
    
    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.
    
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading